Documentation ¶
Index ¶
- func NewFile(config SourceConfig, logger *logger.Logger) *file.Sync
- func NewGRPC(config SourceConfig, logger *logger.Logger) *grpc.Sync
- func NewHTTP(config SourceConfig, logger *logger.Logger) *httpSync.Sync
- func NewK8s(uri string, logger *logger.Logger) (*kubernetes.Sync, error)
- type Config
- type Runtime
- type SourceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { MetricExporter string ManagementPort uint16 OtelCollectorURI string ServiceCertPath string ServiceKeyPath string ServicePort uint16 ServiceSocketPath string SyncProviders []SourceConfig CORS []string }
Config is the configuration structure derived from startup arguments.
type Runtime ¶
type Runtime struct { Evaluator eval.IEvaluator Logger *logger.Logger Service service.IFlagEvaluationService ServiceConfig service.Configuration SyncImpl []sync.ISync // contains filtered or unexported fields }
func FromConfig ¶
FromConfig builds a runtime from startup configurations nolint: funlen
type SourceConfig ¶ added in v0.5.0
type SourceConfig struct { URI string `json:"uri"` Provider string `json:"provider"` BearerToken string `json:"bearerToken,omitempty"` CertPath string `json:"certPath,omitempty"` TLS bool `json:"tls,omitempty"` ProviderID string `json:"providerID,omitempty"` Selector string `json:"selector,omitempty"` Interval uint32 `json:"interval,omitempty"` }
SourceConfig is configuration option for flagd. This maps to startup parameter sources
func ParseSources ¶ added in v0.5.0
func ParseSources(sourcesFlag string) ([]SourceConfig, error)
ParseSources parse a json formatted SourceConfig array string and performs validations on the content
func ParseSyncProviderURIs ¶ added in v0.5.0
func ParseSyncProviderURIs(uris []string) ([]SourceConfig, error)
ParseSyncProviderURIs uri flag based sync sources to SourceConfig array. Replaces uri prefixes where necessary to derive SourceConfig
Click to show internal directories.
Click to hide internal directories.