Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HCLMap ¶
func HCLMap(meta *ServicesMeta) template.FuncMap
HCLMap is the map of template functions for rendering HCL to their respective implementations
Types ¶
type ByName ¶
type ByName []*dep.CatalogSnippet
ByName is a sortable slice of CatalogSnippet structs.
type ByNodeThenID ¶ added in v0.3.0
type ByNodeThenID []*dep.HealthService
ByNodeThenID is a sortable slice of Service
func (ByNodeThenID) Len ¶ added in v0.3.0
func (s ByNodeThenID) Len() int
Len, Swap, and Less are used to implement the sort.Sort interface.
func (ByNodeThenID) Less ¶ added in v0.3.0
func (s ByNodeThenID) Less(i, j int) bool
func (ByNodeThenID) Swap ¶ added in v0.3.0
func (s ByNodeThenID) Swap(i, j int)
type ServicesMeta ¶
type ServicesMeta struct {
// contains filtered or unexported fields
}
ServicesMeta holds the user-defined metadata for the services of a task. From task configuration, metadata is provided to a task's services in one of two ways:
- map of metadata: a map of service-name to metadata so that each service has its own unique metadata
- metadata: a set of metadata is shared across all services that a task is configured with
func (*ServicesMeta) Get ¶ added in v0.5.0
func (m *ServicesMeta) Get(serviceName string) map[string]string
Get returns the metadata for a given service name. Returns an empty map if no meta is associated with the service.
func (*ServicesMeta) SetMeta ¶ added in v0.5.0
func (m *ServicesMeta) SetMeta(meta map[string]string) error
SetMeta sets the task's services' meta with a map of service-name to meta. This will error if meta (map form) is already set.
func (*ServicesMeta) SetMetaMap ¶ added in v0.5.0
func (m *ServicesMeta) SetMetaMap(metaMap map[string]map[string]string) error
SetMetaMap sets the task's services' meta with a map of service-name to meta. This will error if meta (non-map form) is already set.