muxhttpserver

package
v0.0.0-...-3d086f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Types

type Config

type Config struct {
	Address string
	Port    string
}

func DefaultConfig

func DefaultConfig() Config

type Logger

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

type ManifoldConfig

type ManifoldConfig struct {
	// Address is the host portion to use to net.Dial
	Address string

	AuthorityName string
	Logger        Logger
	Port          string
}

func (ManifoldConfig) Start

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

func (ManifoldConfig) Validate

func (c ManifoldConfig) Validate() error

type Server

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

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

func NewServerWithOutTLS

func NewServerWithOutTLS(logger Logger, conf Config) (*Server, error)

func (*Server) Info

func (s *Server) Info() ServerInfo

func (*Server) Kill

func (s *Server) Kill()

Kill implements the worker interface

func (*Server) Port

func (s *Server) Port() string

func (*Server) Wait

func (s *Server) Wait() error

Wait implements the worker interface

type ServerInfo

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL