config

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	Entities []string `json:"entities"`
	// Duration. example: "1h"
	ActorIdleTimeout string `json:"actorIdleTimeout"`
	// Duration. example: "30s"
	ActorScanInterval string `json:"actorScanInterval"`
	// Duration. example: "30s"
	DrainOngoingCallTimeout string `json:"drainOngoingCallTimeout"`
	DrainRebalancedActors   bool   `json:"drainRebalancedActors"`
}

ApplicationConfig is an optional config supplied by user code.

type Configuration

type Configuration struct {
	Spec ConfigurationSpec `json:"spec" yaml:"spec"`
}

func LoadDefaultConfiguration

func LoadDefaultConfiguration() *Configuration

LoadDefaultConfiguration returns the default config with tracing disabled

func LoadKubernetesConfiguration

func LoadKubernetesConfiguration(config, namespace string, operatorClient operatorv1pb.OperatorClient) (*Configuration, error)

LoadKubernetesConfiguration gets configuration from the Kubernetes operator with a given name

func LoadStandaloneConfiguration

func LoadStandaloneConfiguration(config string) (*Configuration, error)

LoadStandaloneConfiguration gets the path to a config file and loads it into a configuration

type ConfigurationSpec

type ConfigurationSpec struct {
	HTTPPipelineSpec PipelineSpec `json:"httpPipeline,omitempty" yaml:"httpPipeline,omitempty"`
	TracingSpec      TracingSpec  `json:"tracing,omitempty" yaml:"tracing,omitempty"`
	MTLSSpec         MTLSSpec     `json:"mtls,omitempty"`
}

type HandlerSpec added in v0.4.0

type HandlerSpec struct {
	Name         string       `json:"name" yaml:"name"`
	Type         string       `json:"type" yaml:"type"`
	SelectorSpec SelectorSpec `json:"selector,omitempty" yaml:"selector,omitempty"`
}

type MTLSSpec added in v0.4.0

type MTLSSpec struct {
	Enabled          bool   `json:"enabled"`
	WorkloadCertTTL  string `json:"workloadCertTTL"`
	AllowedClockSkew string `json:"allowedClockSkew"`
}

type PipelineSpec added in v0.4.0

type PipelineSpec struct {
	Handlers []HandlerSpec `json:"handlers" yaml:"handlers"`
}

type SelectorField added in v0.4.0

type SelectorField struct {
	Field string `json:"field" yaml:"field"`
	Value string `json:"value" yaml:"value"`
}

type SelectorSpec added in v0.4.0

type SelectorSpec struct {
	Fields []SelectorField `json:"fields" yaml:"fields"`
}

type TracingSpec

type TracingSpec struct {
	SamplingRate string `json:"samplingRate" yaml:"samplingRate"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL