Documentation
¶
Index ¶
- func ConsumerProducerMetaName(consumer, producer voyager.ResourceName, postfixParts ...string) string
- func ConsumerProducerResourceName(consumer, producer voyager.ResourceName, postfixParts ...string) smith_v1.ResourceName
- func ConsumerProducerServiceBinding(consumer, producer voyager.ResourceName, serviceInstanceRef smith_v1.Reference) smith_v1.Resource
- func IsSameTarget(a, b smith_v1.Reference) bool
- func Merge(winner, loser map[string]interface{}) (map[string]interface{}, error)
- func MetaName(resource voyager.ResourceName, postfixParts ...string) string
- func ReferenceName(producer smith_v1.ResourceName, nameElems ...string) smith_v1.ReferenceName
- func ResourceInternalServiceBinding(resource voyager.ResourceName, serviceInstance smith_v1.ResourceName, ...) smith_v1.Resource
- func ResourceName(resource voyager.ResourceName, postfixParts ...string) smith_v1.ResourceName
- func ServiceBinding(bindingResourceName smith_v1.ResourceName, bindingMetaName string, ...) smith_v1.Resource
- func ServiceInstanceMetaName(resource voyager.ResourceName) string
- func ServiceInstanceResourceName(resource voyager.ResourceName) smith_v1.ResourceName
- func StripJSONFields(obj map[string]interface{}, badStruct interface{})
- type StatusAdapter
- type TemporaryNewWiringMigrationAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumerProducerMetaName ¶
func ConsumerProducerMetaName(consumer, producer voyager.ResourceName, postfixParts ...string) string
func ConsumerProducerResourceName ¶
func ConsumerProducerResourceName(consumer, producer voyager.ResourceName, postfixParts ...string) smith_v1.ResourceName
func ConsumerProducerServiceBinding ¶
func ConsumerProducerServiceBinding(consumer, producer voyager.ResourceName, serviceInstanceRef smith_v1.Reference) smith_v1.Resource
ConsumerProducerServiceBinding constructs a ServiceBinding to be consumed by a Voyager Resource consumer. ServiceInstance that is bound to is produced by Voyager Resource producer. This function should be used to generate ServiceBindings between two Voyager Resources.
This function assumes that producer exposes a single bindable ServiceInstance. If it is not the case and there is a need to bind to multiple ServiceInstances produced by the same producer, construct names (using ConsumerProducerResourceName() and ConsumerProducerMetaName() functions) with different postfixes.
func IsSameTarget ¶
IsSameTarget tests if two references refer to the same target.
func ReferenceName ¶
func ReferenceName(producer smith_v1.ResourceName, nameElems ...string) smith_v1.ReferenceName
ReferenceName constructs a Smith resource reference name for a particular resource name and name elements.
func ResourceInternalServiceBinding ¶
func ResourceInternalServiceBinding(resource voyager.ResourceName, serviceInstance smith_v1.ResourceName, postfix string) smith_v1.Resource
ResourceInternalServiceBinding constructs a ServiceBinding that is both produced and consumed by an Orchestration resource resource. This function should be used to generate ServiceBindings that are internal to an Orchestration resource.
func ResourceName ¶
func ResourceName(resource voyager.ResourceName, postfixParts ...string) smith_v1.ResourceName
func ServiceBinding ¶
func ServiceInstanceMetaName ¶
func ServiceInstanceMetaName(resource voyager.ResourceName) string
ServiceInstanceMetaName constructs a Kubernetes object meta name for a ServiceInstance for an Orchestration resource. This function is typically used to construct an object meta name for the main ServiceInstance produced by an autowiring function.
func ServiceInstanceResourceName ¶
func ServiceInstanceResourceName(resource voyager.ResourceName) smith_v1.ResourceName
ServiceInstanceResourceName constructs a Smith resource name for a ServiceInstance for an Orchestration resource. This function is typically used to construct a resource name for the main ServiceInstance produced by an autowiring function.
func StripJSONFields ¶
func StripJSONFields(obj map[string]interface{}, badStruct interface{})
StripJSONFields remove fields from an obj that are in badStruct. It is intended to be used after processing certain fields from a struct but the rest should be passed through (i.e. to the ServiceInstance object).
Types ¶
type StatusAdapter ¶
type StatusAdapter func(resource *orch_v1.StateResource, context *wiringplugin.WiringContext) wiringplugin.WiringResult
StatusAdapter provides legacy status behavior for autowiring plugins. This adapter is deprecated, implement the Status() function directly.
func (StatusAdapter) Status ¶
func (f StatusAdapter) Status(resource *orch_v1.StateResource, context *wiringplugin.StatusContext) wiringplugin.StatusResult
func (StatusAdapter) WireUp ¶
func (f StatusAdapter) WireUp(resource *orch_v1.StateResource, context *wiringplugin.WiringContext) wiringplugin.WiringResult
type TemporaryNewWiringMigrationAdapter ¶
type TemporaryNewWiringMigrationAdapter func(resource *orch_v1.StateResource, context *wiringplugin.WiringContext) (*wiringplugin.WiringResultSuccess, bool, error)
func (TemporaryNewWiringMigrationAdapter) Status ¶
func (f TemporaryNewWiringMigrationAdapter) Status(resource *orch_v1.StateResource, context *wiringplugin.StatusContext) wiringplugin.StatusResult
func (TemporaryNewWiringMigrationAdapter) WireUp ¶
func (f TemporaryNewWiringMigrationAdapter) WireUp(resource *orch_v1.StateResource, context *wiringplugin.WiringContext) wiringplugin.WiringResult