Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServer ¶
type APIServer interface { // Setup setups the server engine, like custom routers or middlewares. // Setup should be called before Run. Setup(SetupFunc) error // Run starts the api server engine. Run() error // Close shutdowns the api server engine. Close() }
APIServer is the interface of the api server.
type HTTPOptions ¶
type HTTPOptions struct { BindAddress string `json:"bind-address" mapstructure:"bind-address"` BindPort int `json:"bind-port" mapstructure:"bind-port"` }
HTTPOptions contains configuration for http server.
func (*HTTPOptions) AddFlags ¶
func (o *HTTPOptions) AddFlags(fs *pflag.FlagSet)
func (*HTTPOptions) Address ¶
func (o *HTTPOptions) Address() string
Address join host IP address and host port number into an address string, like: 0.0.0.0:8443.
func (*HTTPOptions) Validate ¶
func (o *HTTPOptions) Validate() []error
type HTTPSOptions ¶
type HTTPSOptions struct { Enabled bool `json:"enabled" mapstructure:"enabled"` BindAddress string `json:"bind-address" mapstructure:"bind-address"` BindPort int `json:"bind-port" mapstructure:"bind-port"` TLS TLSOptions `json:"tls" mapstructure:"tls"` }
HTTPSOptions contains configuration for https server.
func (*HTTPSOptions) AddFlags ¶
func (o *HTTPSOptions) AddFlags(fs *pflag.FlagSet)
func (*HTTPSOptions) Address ¶
func (o *HTTPSOptions) Address() string
Address join host IP address and host port number into an address string, like: 0.0.0.0:8443.
func (*HTTPSOptions) Validate ¶
func (o *HTTPSOptions) Validate() []error
type Options ¶
type Options struct { Healthz bool `json:"healthz" mapstructure:"healthz"` Middlewares []string `json:"middlewares" mapstructure:"middlewares"` Profiling bool `json:"profiling" mapstructure:"profiling"` Metrics bool `json:"metrics" mapstructure:"metrics"` HTTP *HTTPOptions `json:"http" mapstructure:"http"` HTTPS *HTTPSOptions `json:"https" mapstructure:"https"` }
Options contains configuration options for api server.
type TLSOptions ¶
type TLSOptions struct { // CertFile is a file containing a PEM-encoded certificate, and possibly the complete certificate chain CertFile string `json:"cert-file" mapstructure:"cert-file"` // KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile KeyFile string `json:"private-key-file" mapstructure:"private-key-file"` }
TLSOptions contains configuration for TLS.
Click to show internal directories.
Click to hide internal directories.