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

package httpserverargs

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

Index

Package Files

authenticator.go manifold.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold to run a worker to hold the http server mux and authenticator. This means that we can ensure that all workers that need to register with them can be finished starting up before the httpserver responds to connections.

func NewStateAuthenticator Uses

func NewStateAuthenticator(
    statePool *state.StatePool,
    mux *apiserverhttp.Mux,
    clock clock.Clock,
    abort <-chan struct{},
) (httpcontext.LocalMacaroonAuthenticator, error)

NewStateAuthenticator returns a new LocalMacaroonAuthenticator that authenticates users and agents using the given state pool. The authenticator will register handlers into the mux for dealing with local macaroon logins.

type ManifoldConfig Uses

type ManifoldConfig struct {
    ClockName          string
    ControllerPortName string
    StateName          string

    NewStateAuthenticator NewStateAuthenticatorFunc
}

ManifoldConfig holds the resources needed to run an httpserverargs worker.

func (ManifoldConfig) Validate Uses

func (config ManifoldConfig) Validate() error

Validate checks that we have all of the things we need.

type NewStateAuthenticatorFunc Uses

type NewStateAuthenticatorFunc func(
    statePool *state.StatePool,
    mux *apiserverhttp.Mux,
    clock clock.Clock,
    abort <-chan struct{},
) (httpcontext.LocalMacaroonAuthenticator, error)

NewStateAuthenticatorFunc is a function type satisfied by NewStateAuthenticator.

Package httpserverargs imports 11 packages (graph) and is imported by 3 packages. Updated 2018-12-18. Refresh now. Tools for package owners.