Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdExecutor ¶ added in v0.0.2
type CmdExecutor struct{}
type CommandExecutor ¶ added in v0.0.2
CommandExecutor is an interface for running commands.
type ConsulAPIWrapper ¶ added in v0.0.2
type ConsulAPIWrapper struct {
// contains filtered or unexported fields
}
ConsulAPIWrapper wraps the Consul API client to conform to the ConsulClient interface.
func NewConsulAPIWrapper ¶ added in v0.0.2
func NewConsulAPIWrapper(client *api.Client) *ConsulAPIWrapper
NewConsulAPIWrapper creates a new instance of ConsulAPIWrapper.
func (*ConsulAPIWrapper) Agent ¶ added in v0.0.2
func (w *ConsulAPIWrapper) Agent() ConsulAgent
Agent returns an object that conforms to the ConsulAgent interface.
type ConsulAgent ¶ added in v0.0.2
type ConsulAgent interface { Services() (map[string]*api.AgentService, error) ServiceRegister(*api.AgentServiceRegistration) error }
ConsulClientAgent is an interface for the Consul agent.
type ConsulClient ¶ added in v0.0.2
type ConsulClient interface {
Agent() ConsulAgent
}
ConsulClient is an interface for the Consul client.
type TagIt ¶
type TagIt struct { ConsulAddr string ServiceID string Script string Interval time.Duration Token string TagPrefix string // contains filtered or unexported fields }
TagIt is the main struct for the tagit flow.
func New ¶
func New(consulClient ConsulClient, commandExecutor CommandExecutor, serviceID string, script string, interval time.Duration, tagPrefix string) *TagIt
New creates a new TagIt struct.
func (*TagIt) CleanupTags ¶ added in v0.0.2
CleanupTags removes all tags with the given prefix from the service.
Click to show internal directories.
Click to hide internal directories.