Documentation ¶
Index ¶
- Constants
- Variables
- func NewProvider(req *pb.CreateRequest) providers.Provider
- type Config
- type Provider
- func (p *Provider) Annotate(id string, l labels.Labels) error
- func (p *Provider) Apply() error
- func (p *Provider) AwaitReadiness() chan error
- func (p *Provider) Cancel() error
- func (p *Provider) Clone() error
- func (p *Provider) ProbeReadiness() (bool, error)
- func (p *Provider) Read() error
- func (p *Provider) Select() (target.Selection, error)
- func (p *Provider) Stop() error
- func (p *Provider) Teardown() error
- type RoutingConfigurationWeights
Constants ¶
const ( // DefaultOperation is the default mode with which to perform a clone DefaultOperation = "clone" // DefaultCanaryWeight shall be an equal, uniform split DefaultCanaryWeight = 0.5 DefaultSize = 512 )
Variables ¶
var ( // ErrOperationNotDefined is returned if we attempt to clone a function and the // given operation in the config is neither clone or alias ErrOperationNotDefined = errors.New("operation not defined, expecting clone or alias") )
Functions ¶
func NewProvider ¶
func NewProvider(req *pb.CreateRequest) providers.Provider
NewProvider initializes a Provider with defaults
Types ¶
type Config ¶
type Config struct { // Operation allows you to chose between // clone or alias, default is to alias Operation string // Canary defaults to false Canary bool Name string // CanaryWeight, which should be set from the CanaryWeight float64 // MemorySize is the lambda compute resources size MemorySize int64 Timeout int64 // Handler allows a different handler to be used Handler string // Version of the deployed function Version string // Function runtime Runtime string }
Config holds allowed values for an implemented resource provider. Any value outside of this config is unable to be modified during an experiment
type Provider ¶
type Provider struct { Target target.Target // Config holds our internal configuration options // for the instance of the Provider Config Config // RemoteConfig identifies the RemoteConfig *lambda.GetFunctionOutput // CurrentAliasArn is the ARN of an alias if we are operating a clone CurrentAliasArn string }
Provider implements a lambda Provider
func (*Provider) Annotate ¶
Annotate should implement applying labels or tags for a given resource type
func (*Provider) AwaitReadiness ¶
AwaitReadiness should be implemented to detect when a Provider has finished setting up a variant and can begin using it in an experiment
func (*Provider) ProbeReadiness ¶
ProbeReadiness checks that the provisioned resource is available and ready to be included in a live experiment
func (*Provider) Read ¶
Read fetches and stores the configuration for an existing lambda cluster. What is read of the existing resource acts as the template/configuration to implement a clone via creating a new resource with the existing output as input for a variant
type RoutingConfigurationWeights ¶
RoutingConfigurationWeights is for configuration of routing weights if Canary is true