Documentation ¶
Index ¶
- Constants
- Variables
- func Filler(data *Data, err error, next ChainStageNextFunction)
- type Chain
- type ChainStageFunction
- func Persist(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
- func Provision(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
- func ServiceIdentifier(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
- func Validator(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
- type ChainStageNextFunction
- type ChainStages
- type CompConfigPair
- type Data
- type ServiceActionProvider
- type ServiceInfoProvider
Constants ¶
View Source
const FillerPattern = `\$\(#ref\..+\)`
View Source
const ProvisionSuffixKey = ".isProvisioned"
View Source
const UpdateSuffixKey = ".isUpdate"
Variables ¶
View Source
var FillerRegex *regexp.Regexp
Functions ¶
func Filler ¶
func Filler(data *Data, err error, next ChainStageNextFunction)
Filler - filler stage processes the pattern to subsitute Pattern
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain allows to add any number of stages to be added to itself allowing "chaining" all of those functions
func (*Chain) Add ¶
func (ch *Chain) Add(fn ChainStageFunction) *Chain
Add adds a function to the chain and returns a pointer to the Chain object
type ChainStageFunction ¶
type ChainStageFunction func(data *Data, err error, next ChainStageNextFunction)
ChainStageFunction is the type for function that will be invoked on each stage of the chain
func Persist ¶
func Persist(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
func Provision ¶
func Provision(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
func ServiceIdentifier ¶
func ServiceIdentifier(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
ServiceIdentifier takes in a service identity provider and returns a ChainStageFunction
func Validator ¶
func Validator(prov ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction
type ChainStageNextFunction ¶
type ChainStages ¶
type ChainStages []ChainStageNextFunction
ChainStages type represents a slice of ChainStageFunction
type CompConfigPair ¶
type Data ¶
type Data struct { Pattern *core.Pattern PatternSvcWorkloadCapabilities map[string]core.WorkloadCapability PatternSvcTraitCapabilities map[string][]core.TraitCapability // Other is for passing metadata across different stages Lock sync.Mutex Other map[string]interface{} }
Data is the struct that will be passed on each stage
type ServiceActionProvider ¶
Click to show internal directories.
Click to hide internal directories.