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

package muxhttpserver

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

Index

Package Files

manifold.go server.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

type Config Uses

type Config struct {
    Address string
    Port    string
}

func DefaultConfig Uses

func DefaultConfig() Config

type Logger Uses

type Logger interface {
    Debugf(string, ...interface{})
    Errorf(string, ...interface{})
    Infof(string, ...interface{})
}

type ManifoldConfig Uses

type ManifoldConfig struct {
    AuthorityName string
    Logger        Logger
    Port          string
}

func (ManifoldConfig) Start Uses

func (c ManifoldConfig) Start(context dependency.Context) (worker.Worker, error)

func (ManifoldConfig) Validate Uses

func (c ManifoldConfig) Validate() error

type Server Uses

type Server struct {
    Mux *apiserverhttp.Mux
    // contains filtered or unexported fields
}

Server is the http server running inside this worker handling requests to the http mux

func NewServer Uses

func NewServer(authority pki.Authority, logger Logger, conf Config) (*Server, error)

func (*Server) Info Uses

func (s *Server) Info() ServerInfo

func (*Server) Kill Uses

func (s *Server) Kill()

Kill implements the worker interface

func (*Server) Port Uses

func (s *Server) Port() string

func (*Server) Wait Uses

func (s *Server) Wait() error

Wait implements the worker interface

type ServerInfo Uses

type ServerInfo interface {
    Port() string
    PortInt() (int, error)
}

ServerInfo represents a small interface for informining interested party's through manifolds outputs the listening information of the server

Package muxhttpserver imports 12 packages (graph) and is imported by 3 packages. Updated 2020-07-09. Refresh now. Tools for package owners.