juju: github.com/juju/juju/worker/presence Index | Files

package presence

import "github.com/juju/juju/worker/presence"

Index

Package Files

manifold.go presence.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs a pubsub worker, using the resource names defined in the supplied config.

func NewWorker Uses

func NewWorker(config WorkerConfig) (worker.Worker, error)

NewWorker creates a new presence worker that responds to pubsub connection messages.

type Logger Uses

type Logger interface {
    Errorf(message string, args ...interface{})
    Infof(message string, args ...interface{})
    Debugf(message string, args ...interface{})
    Tracef(message string, args ...interface{})
    IsTraceEnabled() bool
}

Logger represents the logging methods called.

type ManifoldConfig Uses

type ManifoldConfig struct {
    AgentName              string
    CentralHubName         string
    StateConfigWatcherName string
    Recorder               presence.Recorder
    Logger                 Logger

    NewWorker func(WorkerConfig) (worker.Worker, error)
}

ManifoldConfig defines the names of the manifolds on which a Manifold will depend.

func (*ManifoldConfig) Validate Uses

func (c *ManifoldConfig) Validate() error

Validate ensures that the required values are set in the structure.

type WorkerConfig Uses

type WorkerConfig struct {
    Origin   string
    Hub      *pubsub.StructuredHub
    Recorder presence.Recorder
    Logger   Logger
}

WorkerConfig defines the configuration values that the pubsub worker needs to operate.

func (*WorkerConfig) Validate Uses

func (c *WorkerConfig) Validate() error

Validate ensures that the required values are set in the structure.

Package presence imports 10 packages (graph) and is imported by 4 packages. Updated 2019-08-22. Refresh now. Tools for package owners.