muxhttpserver

package
v0.0.0-...-b998301 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 14 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 ManifoldConfig

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

	AuthorityName string
	Logger        logger.Logger
	Port          string
}

func (ManifoldConfig) Start

func (c ManifoldConfig) Start(context context.Context, getter dependency.Getter) (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.Logger, conf Config) (*Server, error)

func NewServerWithOutTLS

func NewServerWithOutTLS(logger 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