Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency manifold that runs a logger worker, using the resource names defined in the supplied config.
func NewLogger ¶
func NewLogger(config WorkerConfig) (worker.Worker, error)
NewLogger returns a worker.Worker that uses the notify watcher returned from the setup.
Types ¶
type LoggerAPI ¶
type LoggerAPI interface { LoggingConfig(ctx context.Context, agentTag names.Tag) (string, error) WatchLoggingConfig(ctx context.Context, agentTag names.Tag) (watcher.NotifyWatcher, error) }
LoggerAPI represents the API calls the logger makes.
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string APICallerName string LoggerContext corelogger.LoggerContext Logger corelogger.Logger UpdateAgentFunc func(string) error }
ManifoldConfig defines the names of the manifolds on which a Manifold will depend.
type WorkerConfig ¶
type WorkerConfig struct { Context logger.LoggerContext API LoggerAPI Tag names.Tag Logger logger.Logger Override string Callback func(string) error }
WorkerConfig contains the information required for the Logger worker to operate.
func (*WorkerConfig) Validate ¶
func (c *WorkerConfig) Validate() error
Validate ensures all the necessary fields have values.
Click to show internal directories.
Click to hide internal directories.