config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentOptions

type AgentOptions struct {
	Endpoint   *url.URL
	RetryDelay time.Duration
}

AgentOptions stores the Agent options

type HubOptions

type HubOptions struct {
	Endpoint       *url.URL
	GuardToken     string
	PublishToken   string
	SubscribeToken string
	Timeout        time.Duration
	Topic          string
	Target         string
}

HubOptions stores the Hub options

type Options

type Options struct {
	Debug  bool
	Agent  AgentOptions
	Hub    HubOptions
	Server ServerOptions
}

Options stores the Broadcaster's options

func NewOptionsFromEnv

func NewOptionsFromEnv() (*Options, error)

NewOptionsFromEnv creates a new option instance from environment It returns an error if mandatory env env vars are missing

type ServerOptions

type ServerOptions struct {
	Addr               string
	ReadTimeout        time.Duration
	WriteTimeout       time.Duration
	CorsAllowedOrigins []string
	Insecure           bool
	TrustedIPs         []string
	TLS                TLSServerOptions
}

ServerOptions stores the Server's options

type TLSServerOptions

type TLSServerOptions struct {
	AcmeAddr    string
	AcmeCertDir string
	AcmeHosts   []string
	CertFile    string
	KeyFile     string
}

TLSServerOptions stores the Server's TLS options

Jump to

Keyboard shortcuts

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