tagit

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

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{}

func (*CmdExecutor) Execute added in v0.0.2

func (e *CmdExecutor) Execute(command string) ([]byte, error)

type CommandExecutor added in v0.0.2

type CommandExecutor interface {
	Execute(command string) ([]byte, error)
}

CommandExecutor is an interface for running commands.

type TagIt

type TagIt struct {
	ServiceID string
	Script    string
	Interval  time.Duration
	TagPrefix string
	// contains filtered or unexported fields
}

TagIt is the main struct for the tagit flow.

func New

func New(consulClient consul.Client, commandExecutor CommandExecutor, serviceID string, script string, interval time.Duration, tagPrefix string, logger *slog.Logger) *TagIt

New creates a new TagIt struct.

func (*TagIt) CleanupTags added in v0.0.2

func (t *TagIt) CleanupTags() error

CleanupTags removes all tags with the given prefix from the service.

func (*TagIt) Run

func (t *TagIt) Run(ctx context.Context)

Run will run the tagit flow and tag consul services based on the script output

Jump to

Keyboard shortcuts

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