multiserver

package
v1.1.0-beta.24 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func Get

Get returns http handler for multi server check.

func Register

func Register(ctx context.Context) (*chi.Config, error)

Register registers multi server check router for chi.

Types

type MultiServer

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

MultiServer struct that represents a multiserver.

func NewMultiServer

func NewMultiServer() *MultiServer

NewMultiServer returns a new multiserver with default options.

func NewMultiServerWithConfigPath

func NewMultiServerWithConfigPath(path string) (*MultiServer, error)

NewMultiServerWithConfigPath returns a new multiserver with options from config path.

func NewMultiServerWithOptions

func NewMultiServerWithOptions(options *Options) *MultiServer

NewMultiServerWithOptions returns a new multiserver with options.

func (*MultiServer) Register

func (i *MultiServer) Register(ctx context.Context) (*chi.Config, error)

Register registers a multi server check router in a new chi config.

type Options

type Options struct {
	Enabled bool
	Route   string
}

Options struct that represents multiserver options

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptions returns options from config path.

Jump to

Keyboard shortcuts

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