Back to godoc.org

Package canary

v0.13.0
Latest Go to latest
Published: Jul 7, 2020 | License: MIT | Module: github.com/uber/cadence

Index

Package Files

Constants

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"
)
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"
)

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

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

Cadence contains the configuration for cadence service

type Canary

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

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

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

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

NewRuntimeContext builds a runtime context from the config

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier