Left: | ||
Right: |
OLD | NEW |
---|---|
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 Loading... | |
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 } | |
OLD | NEW |