http

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRunning       = &SAppError{"adapter running"}
	ErrNoConnections = &SAppError{"no connections"}
)

Functions

This section is empty.

Types

type IHTTPAdapter

type IHTTPAdapter interface {
	WithLogger(name.IServiceName, logger.ILogger) IHTTPAdapter
	WithHandlers(...IHandler) IHTTPAdapter
	GetOnlines() []string
	adapters.IRunnerAdapter
}

func NewHTTPAdapter

func NewHTTPAdapter(
	pSettings ISettings,
	pCache cache.ICache,
	pConnsGetter func() []string,
) IHTTPAdapter

type IHandler

type IHandler interface {
	GetPath() string
	GetFunc() func(http.ResponseWriter, *http.Request)
}

func NewHandler

func NewHandler(pPath string, pFunc func(http.ResponseWriter, *http.Request)) IHandler

type ISettings

type ISettings interface {
	GetAdapterSettings() adapters.ISettings
	GetAddress() string
}

func NewSettings

func NewSettings(pSett *SSettings) ISettings

type SAppError added in v1.8.1

type SAppError struct {
	// contains filtered or unexported fields
}

func (*SAppError) Error added in v1.8.1

func (err *SAppError) Error() string

type SSettings

type SSettings sSettings

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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