canary

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvKeyRoot the environment variable key for runtime root dir
	EnvKeyRoot = "CADENCE_CANARY_ROOT"
	// EnvKeyConfigDir the environment variable key for config dir
	EnvKeyConfigDir = "CADENCE_CANARY_CONFIG_DIR"
	// EnvKeyEnvironment is the environment variable key for environment
	EnvKeyEnvironment = "CADENCE_CANARY_ENVIRONMENT"
	// EnvKeyAvailabilityZone is the environment variable key for AZ
	EnvKeyAvailabilityZone = "CADENCE_CANARY_AVAILABILITY_ZONE"
)
View Source
const (
	// CadenceLocalHostPort is the default address for cadence frontend service
	CadenceLocalHostPort = "127.0.0.1:7933"
	// CadenceServiceName is the default service name for cadence frontend
	CadenceServiceName = "cadence-frontend"
	// CanaryServiceName is the default service name for cadence canary
	CanaryServiceName = "cadence-canary"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchParams

type BatchParams struct {
	DomainName string
	Query      string
	Reason     string
	BatchType  string
}

BatchParams is from server repo TODO: to get rid of it:

after batch job has an API, we should use the API: https://github.com/uber/cadence/issues/2225

type Cadence added in v0.12.0

type Cadence struct {
	ServiceName     string `yaml:"service"`
	HostNameAndPort string `yaml:"host"`
}

Cadence contains the configuration for cadence service

type Canary added in v0.12.0

type Canary struct {
	Domains  []string `yaml:"domains"`
	Excludes []string `yaml:"excludes"`
}

Canary contains the configuration for canary tests

type Config

type Config struct {
	Canary  Canary         `yaml:"canary"`
	Cadence Cadence        `yaml:"cadence"`
	Log     config.Logger  `yaml:"log"`
	Metrics config.Metrics `yaml:"metrics"`
}

Config contains the configurable yaml properties for the canary runtime

func (*Config) Validate added in v0.12.0

func (c *Config) Validate() error

Validate validates canary configration

type Runnable

type Runnable interface {
	Run() error
}

Runnable is an interface for anything that exposes a Run method

func NewCanaryRunner added in v0.12.0

func NewCanaryRunner(cfg *Config) (Runnable, error)

NewCanaryRunner creates and returns a runnable which spins up a set of canaries based on supplied config

type RuntimeContext

type RuntimeContext struct {
	// contains filtered or unexported fields
}

RuntimeContext contains all the context information needed to run the canary

func NewRuntimeContext added in v0.12.0

func NewRuntimeContext(
	logger *zap.Logger,
	scope tally.Scope,
	service workflowserviceclient.Interface,
) *RuntimeContext

NewRuntimeContext builds a runtime context from the config

Jump to

Keyboard shortcuts

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