Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMembraneVersion string
Functions ¶
func AddOptions ¶
func EnsureRuntimeDefaults ¶
func EnsureRuntimeDefaults() bool
Types ¶
type Collection ¶
type Collection struct{}
type Compute ¶
type Compute interface {
ImageTagName(s *Stack, provider string) string
Unit() *ComputeUnit
}
type ComputeUnit ¶
type ComputeUnit struct {
Name string `yaml:"-"`
// Triggers used to invoke this compute unit, e.g. Topic Subscriptions
Triggers Triggers `yaml:"triggers,omitempty"`
// The memory of the compute instance in MB
Memory int `yaml:"memory,omitempty"`
// The minimum number of instances to keep alive
MinScale int `yaml:"minScale,omitempty"`
// The maximum number of instances to scale to
MaxScale int `yaml:"maxScale,omitempty"`
}
type Container ¶
type Container struct {
Dockerfile string `yaml:"dockerfile"`
Args []string `yaml:"args,omitempty"`
ComputeUnit `yaml:",inline"`
}
func (*Container) ImageTagName ¶
ImageTagName returns the default image tag for a source image built from this function provider the provider name (e.g. aws), used to uniquely identify builds for specific providers
func (*Container) Unit ¶
func (c *Container) Unit() *ComputeUnit
type Function ¶
type Function struct {
// The location of the function handler
Handler string `yaml:"handler"`
ComputeUnit `yaml:",inline"`
}
func FunctionFromHandler ¶
func (*Function) ImageTagName ¶
ImageTagName returns the default image tag for a source image built from this function provider the provider name (e.g. aws), used to uniquely identify builds for specific providers
func (*Function) RelativeHandlerPath ¶
func (*Function) Unit ¶
func (f *Function) Unit() *ComputeUnit
func (*Function) VersionString ¶
type Schedule ¶
type Schedule struct {
Expression string `yaml:"expression"`
// The Topic to be targeted for schedule
Target ScheduleTarget `yaml:"target"`
Event ScheduleEvent `yaml:"event"`
}
type ScheduleEvent ¶
type ScheduleEvent struct {
PayloadType string `yaml:"payloadType"`
Payload map[string]interface{} `yaml:"payload,omitempty"`
}
A subset of a NitricEvent excluding it's requestId This will be generated based on the scedule
type ScheduleTarget ¶
type Stack ¶
type Stack struct {
Dir string `yaml:"-"`
Name string `yaml:"name"`
Functions map[string]Function `yaml:"functions,omitempty"`
Collections map[string]Collection `yaml:"collections,omitempty"`
Containers map[string]Container `yaml:"containers,omitempty"`
Buckets map[string]Bucket `yaml:"buckets,omitempty"`
Topics map[string]Topic `yaml:"topics,omitempty"`
Queues map[string]Queue `yaml:"queues,omitempty"`
Schedules map[string]Schedule `yaml:"schedules,omitempty"`
ApiDocs map[string]*openapi3.T `yaml:"-"`
Apis map[string]string `yaml:"apis,omitempty"`
// TODO: Not currently supported by nitric.yaml configuration (but is technically definable using the proto model)
// We may want to decouple the definition from contracts at a later stage
// but re-using the contract here provides us a serializable entity with no
// repetition/redefinition
// NOTE: if we want to use the proto definition here we would need support for yaml parsing to use customisable tags
Policies []*v1.PolicyResource `yaml:"-"`
}
func FromOptions ¶
func FromOptionsMinimal ¶
Click to show internal directories.
Click to hide internal directories.