server

package
v0.0.0-...-8dd3885 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompletedConfig

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

CompletedConfig can be constructed only from Config.Complete

type Config

type Config struct {
	Options *Options
	Auth    *auth.Config
}

func NewConfig

func NewConfig(o *Options) *Config

func (*Config) Complete

func (c *Config) Complete() CompletedConfig

type Options

type Options struct {
	Auth    *auth.Options `mapstructure:"auth"`
	Address string        `mapstructure:"addr"`

	CertFile string `mapstructure:"cert-file"`
	KeyFile  string `mapstructure:"key-file"`

	SecureServing bool
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

func (*Options) Complete

func (o *Options) Complete() error

func (*Options) Validate

func (o *Options) Validate() []error

type Server

type Server struct {
	CompletedConfig

	Handler http.Handler
	Log     logr.Logger
}

func New

func New(c CompletedConfig, handler http.Handler, log logr.Logger) (*Server, error)

func (*Server) PrepareRun

func (s *Server) PrepareRun() preparedServer

Directories

Path Synopsis
Here we setup the REST handler for the service using chi.
Here we setup the REST handler for the service using chi.

Jump to

Keyboard shortcuts

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