tmplfunc

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

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.

func (ByName) Len

func (s ByName) Len() int

func (ByName) Less

func (s ByName) Less(i, j int) bool

func (ByName) Swap

func (s ByName) Swap(i, j int)

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:

  1. map of metadata: a map of service-name to metadata so that each service has its own unique metadata
  2. 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL