Documentation ¶
Index ¶
Constants ¶
View Source
const ( FederationModeDisabled = "" FederationModePublish = "publish" FederationModeSubscribe = "subscribe" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ApiTokenNameSuffix string `envconfig:"API_TOKEN_NAME_SUFFIX"` Federation FederationConfig HealthProbeBindAddress string `envconfig:"HEALTH_PROBE_BIND_ADDRESS" default:":8081"` LeaderElectionEnabled bool `envconfig:"LEADER_ELECTION_ENABLED" default:"true"` LeaderElectionResourceName string `envconfig:"LEADER_ELECTION_RESOURCE_NAME" default:"509984d3.nais.io"` MetricsBindAddress string `envconfig:"METRICS_BIND_ADDRESS" default:"127.0.0.1:8080"` ClusterName string `envconfig:"CLUSTER_NAME" required:"true"` PodName string `envconfig:"POD_NAME" required:"true"` PodNamespace string `envconfig:"POD_NAMESPACE" required:"true"` Log LogConfig Timeout TimeoutConfig WebhookPort int `envconfig:"WEBHOOK_PORT" default:"9443"` Features Features OpenTelemetry OpenTelemetryConfig }
func LoadFromEnv ¶
func (*Config) ManagerOptions ¶
func (*Config) PubsubPublisher ¶
func (*Config) PubsubSubscriber ¶
func (c *Config) PubsubSubscriber(ctx context.Context) (federation.Subscriber, error)
type FederationConfig ¶
type FederationConfig struct { Mode FederationMode `envconfig:"FEDERATION_PUBSUB_MODE"` PubsubProjectID string `envconfig:"FEDERATION_PUBSUB_GCP_PROJECT_ID"` PubsubTopic string `envconfig:"FEDERATION_PUBSUB_TOPIC"` PubsubSubscription string `envconfig:"FEDERATION_PUBSUB_SUBSCRIPTION"` }
func (*FederationConfig) IsEnabled ¶
func (f *FederationConfig) IsEnabled() bool
type FederationMode ¶
type FederationMode string
func (*FederationMode) Set ¶
func (p *FederationMode) Set(value string) error
type OpenTelemetryConfig ¶
type TimeoutConfig ¶
type TimeoutConfig struct { // WriteSeconds is the maximum number of seconds to wait for a write operation to complete. Write time.Duration `envconfig:"TIMEOUT_WRITE" default:"10s"` }
func (*TimeoutConfig) WriteContext ¶
func (t *TimeoutConfig) WriteContext(ctx context.Context) (context.Context, context.CancelFunc)
Click to show internal directories.
Click to hide internal directories.