Back to

Package canary

Latest Go to latest
Published: Jul 7, 2020 | License: MIT | Module:


Package Files


const (
	// EnvKeyRoot the environment variable key for runtime root dir
	// EnvKeyConfigDir the environment variable key for config dir
	// EnvKeyEnvironment is the environment variable key for environment
	// EnvKeyAvailabilityZone is the environment variable key for AZ
const (
	// CadenceLocalHostPort is the default address for cadence frontend service
	CadenceLocalHostPort = ""
	// 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:

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