Back to godoc.org
github.com/juju/juju/worker/httpserverargs

package httpserverargs

v0.0.0 (4dcf1d7)
Latest Go to latest
Published: 1 day ago | License: AGPL-3.0 | Module: github.com/juju/juju

Index

func Manifold

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

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

type ManifoldConfig struct {
	ClockName          string
	ControllerPortName string
	StateName          string

	NewStateAuthenticator NewStateAuthenticatorFunc
}

ManifoldConfig holds the resources needed to run an httpserverargs worker.

func (ManifoldConfig) Validate

func (config ManifoldConfig) Validate() error

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

type NewStateAuthenticatorFunc

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier