github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/resource/unit.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package resource
     5  
     6  import (
     7  	"gopkg.in/juju/charm.v6-unstable"
     8  )
     9  
    10  // TODO(ericsnow) Move Unit to an internal package?
    11  
    12  // Unit represents a Juju unit.
    13  type Unit interface {
    14  	// Name is the name of the Unit.
    15  	Name() string
    16  
    17  	// ApplicationName is the name of the application to which the unit belongs.
    18  	ApplicationName() string
    19  
    20  	// CharmURL returns the unit's charm URL.
    21  	CharmURL() (*charm.URL, bool)
    22  }