85
85
// Destroy ensures that the relation will be removed at some point; if no units
86
86
// are currently in scope, it will be removed immediately.
87
87
func (r *Relation) Destroy() (err error) {
89
89
if len(r.doc.Endpoints) == 1 && r.doc.Endpoints[0].Role == charm.RolePeer {
90
90
return fmt.Errorf("is a peer relation")