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.
Types ¶
type Logger ¶
type Logger interface {
Debugf(string, ...interface{})
Infof(string, ...interface{})
Warningf(string, ...interface{})
Errorf(string, ...interface{})
}
Logger represents a loggo logger for the purpose of recording what is going on.
type LoggerAPI ¶
type LoggerAPI interface {
LoggingConfig(agentTag names.Tag) (string, error)
WatchLoggingConfig(agentTag names.Tag) (watcher.NotifyWatcher, error)
}
LoggerAPI represents the API calls the logger makes.
type ManifoldConfig ¶
type ManifoldConfig struct {
AgentName string
APICallerName string
LoggingContext *loggo.Context
Logger Logger
UpdateAgentFunc func(string) error
}
ManifoldConfig defines the names of the manifolds on which a Manifold will depend.
type WorkerConfig ¶
type WorkerConfig struct {
Context *loggo.Context
API LoggerAPI
Tag names.Tag
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.