connect

package
v0.0.0-...-15f65a9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterServer

func NewClusterServer(svc cluster.Cluster, logger logging.Logger) *clusterServer

func NewRatelimitServer

func NewRatelimitServer(svc RatelimitService, logger logging.Logger, authToken string) *ratelimitServer

Types

type Config

type Config struct {
	Logger  logging.Logger
	Metrics metrics.Metrics
	Image   string
}

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*Server, error)

func (*Server) AddService

func (s *Server) AddService(svc Service) error

func (*Server) EnablePprof

func (s *Server) EnablePprof(expectedUsername string, expectedPassword string)

func (*Server) Listen

func (s *Server) Listen(addr string) error

func (*Server) Shutdown

func (s *Server) Shutdown() error

type Service

type Service interface {
	CreateHandler() (pattern string, handler http.Handler, err error)
}

Jump to

Keyboard shortcuts

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