 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfigurationVariables ¶
func InitConfigurationVariables(configs []ConfigurationVariables) error
InitConfigurationVariables according to environment
Types ¶
type ConfigurationVariables ¶
type ConfigurationVariables interface {
	LoadFromEnvVars() error
}
    ConfigurationVariables is an interface with LoadFromEnvVars method. The method is meant to be implemented as a struct method:
type StructWithVars struct {
	Var1 string        `envconfig:"VAR1"`
	Var2 string        `envconfig:"VAR2"`
}
func (swv *StructWithVars) LoadFromEnvVars() error {
  if err := envconfig.Process("", swv); err != nil {
		return err
	}
	return nil
}
  
    type ManagerConfiguration ¶
type ManagerConfiguration struct {
	EnableLeaderElection bool   `envconfig:"ENABLE_LEADER_ELECTION" required:"true"`
	LeaderElectionID     string `envconfig:"LEADER_ELECTION_ID" required:"true"`
	Port                 int    `envconfig:"MANAGER_PORT" default:"9443"`
	MetricsServerPort    int    `envconfig:"METRICS_SERVER_PORT" default:"8080"`
	HealthProbeAddress   string `envconfig:"HEALTH_PROBE_ADDRESS" default:":8081"`
}
    ManagerConfiguration defines required variables to configure the environment
func (*ManagerConfiguration) LoadFromEnvVars ¶
func (c *ManagerConfiguration) LoadFromEnvVars() error
LoadFromEnvVars from the Manager
type Namespace ¶
type Namespace string
Namespace defines the namespace type that represents the cluster namespace
type RESTControllerConfiguration ¶
type RESTControllerConfiguration struct {
	UserID             string        `envconfig:"USER_ID" required:"true"`
	UserIDPrefix       string        `envconfig:"USER_ID_PREFIX" default:""`
	HTTPRequestTimeout time.Duration `envconfig:"HTTP_REQUEST_TIMEOUT" default:"30s"`
}
    RESTControllerConfiguration defines a struct with required environment variables for rest controller
func (*RESTControllerConfiguration) LoadFromEnvVars ¶
func (c *RESTControllerConfiguration) LoadFromEnvVars() error
LoadFromEnvVars reads all env vars required
 Click to show internal directories. 
   Click to hide internal directories.