Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletedConfig ¶
type CompletedConfig struct {
*Config
}
CompletedConfig is the completed configuration for GenericAPIServer.
func (CompletedConfig) New ¶
func (c CompletedConfig) New() (*GenericAPIServer, error)
New returns a new instance of GenericAPIServer from the given configs.
type Config ¶
type Config struct {
SecureServing *SecureServingInfo
Mode string
Id int64
}
Config is a structure used to configure a GenericAPIServer. Its members are sorted roughly in order of importance for composers.
func NewConfig ¶
func NewConfig() *Config
NewConfig returns a Config struct with the default values.
func (*Config) Complete ¶
func (c *Config) Complete() CompletedConfig
Complete fills in any fields not set that are required to have valid data and can be derived from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver.
type GenericAPIServer ¶
type GenericAPIServer struct {
// SecureServingInfo holds configuration of the TLS server.
SecureServingInfo *SecureServingInfo
// ShutdownTimeout is the timeout used for server shutdown. This specifies the timeout before server
// gracefully shutdown returns.
ShutdownTimeout time.Duration
*gin.Engine
// contains filtered or unexported fields
}
APIServer contains state for an iam api server.
func (*GenericAPIServer) Run ¶
func (s *GenericAPIServer) Run() error
Run spawns the http server. It only returns when the port cannot be listened on initially.
func (GenericAPIServer) Setup ¶
func (s GenericAPIServer) Setup()
type SecureServingInfo ¶
SecureServingInfo holds configuration of the TLS server.
func (*SecureServingInfo) Address ¶
func (s *SecureServingInfo) Address() string
Address join host IP address and host port number into a address string, like: 0.0.0.0:8443.
type Snowflake ¶
type Snowflake struct {
// contains filtered or unexported fields
}
Snowflake represents a distributed unique ID generator.
var SnowflakeSrv *Snowflake
func NewSnowflake ¶
New creates a new Snowflake instance with the given machine ID.