Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 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 logicServer to the specified FlagSet.
func (*InsecureServingOptions) ApplyTo ¶
func (s *InsecureServingOptions) ApplyTo(c *server.Config) error
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 SecureServingOptions ¶
type SecureServingOptions struct {
BindAddress string `json:"bind-address" mapstructure:"bind-address"`
// BindPort is ignored when Listener is set, will serve HTTPS even with 0.
BindPort int `json:"bind-port" mapstructure:"bind-port"`
// Required to be set to true means that BindPort cannot be zero.
Required bool
// ServerCert is the TLS cert info for serving secure traffic
ServerCert GeneratableKeyCert `json:"tls" mapstructure:"tls"`
}
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 HTTPS logicServer 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 {
Mode string `json:"mode" mapstructure:"mode"`
Healthz bool `json:"healthz" mapstructure:"healthz"`
Middlewares []string `json:"middlewares" mapstructure:"middlewares"`
}
ServerRunOptions contains the options while a generic api logicServer is running
func NewServerRunOptions ¶
func NewServerRunOptions() *ServerRunOptions
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.