Documentation ¶
Index ¶
- func CreateListener(addr string) (net.Listener, int, error)
- type CertKey
- type GRPCServerOptions
- type GeneratableKeyCert
- type InsecureServingOptions
- type MonitorOptions
- type RAOptions
- type SecureServingOptions
- type ServerRunOptions
- type WebServerConfigOptions
- type WebServerConfigsOptions
- type WebServerLogWatcherOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CertKey ¶
type CertKey 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"` }
CertKey contains configuration items related to certificate.
type GRPCServerOptions ¶
type GRPCServerOptions struct { ChunkSize int `json:"chunksize" mapstructure:"chunksize"` ReceiveTimeoutMinutes int `json:"receive-timeout-minutes" mapstructrue:"receive-timeout-minutes"` }
func NewGRPCServerOptions ¶
func NewGRPCServerOptions() *GRPCServerOptions
func (*GRPCServerOptions) AddFlags ¶
func (g *GRPCServerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags for a specific gRPC Server to the specified FlagSet.
func (*GRPCServerOptions) ApplyTo ¶
func (g *GRPCServerOptions) ApplyTo(c *server.Config) error
ApplyTo applies the run options to the method receiver and returns self.
func (*GRPCServerOptions) Validate ¶
func (g *GRPCServerOptions) Validate() []error
Validate checks validation of GRPCServerOptions.
type GeneratableKeyCert ¶
type GeneratableKeyCert struct { // CertKey allows setting an explicit cert/key file to use. CertKey CertKey `json:"cert-key" mapstructure:"cert-key"` // CertDirectory specifies a directory to write generated certificates to if CertFile/KeyFile aren't explicitly set. // PairName is used to determine the filenames within CertDirectory. // If CertDirectory and PairName are not set, an in-memory certificate will be generated. CertDirectory string `json:"cert-dir" mapstructure:"cert-dir"` // PairName is the name which will be used with CertDirectory to make a cert and key filenames. // It becomes CertDirectory/PairName.crt and CertDirectory/PairName.key PairName string `json:"pair-name" mapstructure:"pair-name"` }
GeneratableKeyCert contains configuration items related to certificate.
type InsecureServingOptions ¶
type InsecureServingOptions struct { BindAddress string `json:"bind-address" mapstructure:"bind-address"` BindPort int `json:"bind-port" mapstructure:"bind-port"` }
InsecureServingOptions are for creating an unauthenticated, unauthorized, insecure port. No one should be using these anymore.
func NewInsecureServingOptions ¶
func NewInsecureServingOptions() *InsecureServingOptions
NewInsecureServingOptions is for creating an unauthenticated, unauthorized, insecure port. No one should be using these anymore.
func (*InsecureServingOptions) AddFlags ¶
func (s *InsecureServingOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to features for a specific api server to the specified FlagSet.
func (*InsecureServingOptions) ApplyTo ¶
func (s *InsecureServingOptions) ApplyTo(c *server.Config) error
ApplyTo applies the run options to the method receiver and returns self.
func (*InsecureServingOptions) Validate ¶
func (s *InsecureServingOptions) Validate() []error
Validate is used to parse and validate the parameters entered by the user at the command line when the program starts.
type MonitorOptions ¶
type MonitorOptions struct { SyncInterval time.Duration `json:"sync-interval" mapstructure:"sync-interval"` CycleTime time.Duration `json:"cycle-time" mapstructure:"cycle-time"` FrequencyPerCycle int `json:"frequency-per-cycle" mapstructure:"frequency-per-cycle"` }
func NewMonitorOptions ¶
func NewMonitorOptions() *MonitorOptions
func (*MonitorOptions) AddFlags ¶
func (m *MonitorOptions) AddFlags(fs *pflag.FlagSet)
func (*MonitorOptions) Validate ¶
func (m *MonitorOptions) Validate() []error
type RAOptions ¶
type RAOptions struct { Host string `json:"host" mapstructure:"host"` Port int `json:"port" mapstructure:"port"` }
RAOptions contains the options used to connect to the RA server.
func NewRAOptions ¶
func NewRAOptions() *RAOptions
type SecureServingOptions ¶
type SecureServingOptions struct { BindAddress string `json:"bind-address" mapstructure:"bind-address"` // BindPort is ignored when Listener is set, will disable even with 0. BindPort int `json:"bind-port" mapstructure:"bind-port"` // ServerCert is the TLS cert info for serving secure traffic ServerCert GeneratableKeyCert `json:"tls" mapstructure:"tls"` }
SecureServingOptions contains configuration items related to TLS server startup.
func NewSecureServingOptions ¶
func NewSecureServingOptions() *SecureServingOptions
NewSecureServingOptions creates a SecureServingOptions object with default parameters.
func (*SecureServingOptions) AddFlags ¶
func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags related to TLS server for a specific APIServer to the specified FlagSet.
func (*SecureServingOptions) ApplyTo ¶
func (s *SecureServingOptions) ApplyTo(c *server.Config) error
ApplyTo applies the run options to the method receiver and returns self.
func (*SecureServingOptions) Complete ¶
func (s *SecureServingOptions) Complete() error
Complete fills in any fields not set that are required to have valid data.
func (*SecureServingOptions) Validate ¶
func (s *SecureServingOptions) Validate() []error
Validate is used to parse and validate the parameters entered by the user at the command line when the program starts.
type ServerRunOptions ¶
type ServerRunOptions struct { Healthz bool `json:"healthz" mapstructure:"healthz"` Middlewares []string `json:"middlewares" mapstructure:"middlewares"` }
ServerRunOptions contains the options while running a generic api server
func NewServerRunOptions ¶
func NewServerRunOptions() *ServerRunOptions
NewServerRunOptions creates a new ServerRunOptions object with default parameters.
func (*ServerRunOptions) AddFlags ¶
func (s *ServerRunOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds flags for a specific APIServer to the specified FlagSet.
func (*ServerRunOptions) ApplyTo ¶
func (s *ServerRunOptions) ApplyTo(c *server.Config) error
ApplyTo applies the run options to the method receiver and returns self.
func (*ServerRunOptions) Validate ¶
func (s *ServerRunOptions) Validate() []error
Validate checks validation of ServerRunOptions.
type WebServerConfigOptions ¶
type WebServerConfigOptions struct { ServerName string `json:"server-name" mapstructure:"server-name"` ServerType string `json:"server-type" mapstructure:"server-type"` ConfigPath string `json:"config-path" mapstructure:"config-path"` VerifyExecPath string `json:"verify-exec-path" mapstructure:"verify-exec-path"` LogsDirPath string `json:"logs-dir-path" mapstructure:"logs-dir-path"` BackupDir string `json:"backup-dir" mapstructure:"backup-dir"` BackupCycle int `json:"backup-cycle" mapstructure:"backup-cycle"` BackupSaveTime int `json:"backup-save-time" mapstructure:"backup-save-time"` }
func NewWebServerConfigOptions ¶
func NewWebServerConfigOptions() *WebServerConfigOptions
func (*WebServerConfigOptions) AddFlags ¶
func (c *WebServerConfigOptions) AddFlags(fs *pflag.FlagSet)
func (*WebServerConfigOptions) Validate ¶
func (c *WebServerConfigOptions) Validate() []error
type WebServerConfigsOptions ¶
type WebServerConfigsOptions struct {
WebServerConfigs []*WebServerConfigOptions `json:"items" mapstructure:"items"`
}
func NewWebServerConfigsOptions ¶
func NewWebServerConfigsOptions() *WebServerConfigsOptions
func (*WebServerConfigsOptions) Validate ¶
func (cs *WebServerConfigsOptions) Validate() []error
type WebServerLogWatcherOptions ¶
type WebServerLogWatcherOptions struct { MaxConnections int `json:"max-connections" mapstructure:"max-connections"` WatchTimeout time.Duration `json:"watch-timeout" mapstructure:"watch-timeout"` }
func NewWebServerLogWatcherOptions ¶
func NewWebServerLogWatcherOptions() *WebServerLogWatcherOptions
func (*WebServerLogWatcherOptions) AddFlags ¶
func (w *WebServerLogWatcherOptions) AddFlags(fs *pflag.FlagSet)
func (*WebServerLogWatcherOptions) ApplyTo ¶
func (w *WebServerLogWatcherOptions) ApplyTo(c *file_watcher.Config) error
func (*WebServerLogWatcherOptions) Validate ¶
func (w *WebServerLogWatcherOptions) Validate() []error