Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(740)

Side by Side Diff: state/relation.go

Issue 6250076: state: Added the method RemoveRelation() to State. (Closed)
Patch Set: state: Added the method RemoveRelation() to State. Created 11 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 package state 1 package state
2 2
3 import () 3 import ()
4 4
5 // RelationRole defines the role of a relation endpoint. 5 // RelationRole defines the role of a relation endpoint.
6 type RelationRole string 6 type RelationRole string
7 7
8 const ( 8 const (
9 RoleProvider RelationRole = "provider" 9 RoleProvider RelationRole = "provider"
10 RoleRequirer RelationRole = "requirer" 10 RoleRequirer RelationRole = "requirer"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // RelationRole returns the service role within the relation.· 73 // RelationRole returns the service role within the relation.·
74 func (r *ServiceRelation) RelationRole() RelationRole { 74 func (r *ServiceRelation) RelationRole() RelationRole {
75 return r.relationRole 75 return r.relationRole
76 } 76 }
77 77
78 // RelationName returns the name this relation has within the service. 78 // RelationName returns the name this relation has within the service.
79 func (r *ServiceRelation) RelationName() string { 79 func (r *ServiceRelation) RelationName() string {
80 return r.relationName 80 return r.relationName
81 } 81 }
82
83 // Relation returns the relation for this service relation.
84 func (r *ServiceRelation) Relation() *Relation {
niemeyer 2012/06/05 20:35:40 This needs a test.
TheMue 2012/06/06 12:12:04 Done. It's now in TestServiceRelationRelation() us
85 return &Relation{r.st, r.relationKey}
86 }
OLDNEW
« no previous file with comments | « state/internal_test.go ('k') | state/state.go » ('j') | state/state_test.go » ('J')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b