wiring

package
v0.0.0-...-e0434a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EntangleResultSuccessType EntangleResultType = "success"
	EntangleResultFailureType EntangleResultType = "failure"
	StatusResultSuccessType   StatusResultType   = "success"
	StatusResultFailureType   StatusResultType   = "failure"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleResource

type BundleResource struct {
	// Object is the actual object that has been created as the result of processing an Orchestration StateResource.
	Resource smith_v1.Resource `json:"object"`
	// Status is the status of that object as reported by Smith.
	Status smith_v1.ResourceStatusData `json:"status"`
}

type EntangleContext

type EntangleContext struct {
	// ServiceName
	ServiceName voyager.ServiceName

	// Label
	Label voyager.Label

	ServiceProperties orch_meta.ServiceProperties
}

EntangleContext contains information that is required by autowiring. Everything in this context can only be obtained by reading Kubernetes objects.

type EntangleResult

type EntangleResult interface {
	StatusType() EntangleResultType
}

type EntangleResultFailure

type EntangleResultFailure struct {
	Error            error
	IsRetriableError bool
	IsExternalError  bool
}

func (*EntangleResultFailure) StatusType

func (e *EntangleResultFailure) StatusType() EntangleResultType

type EntangleResultSuccess

type EntangleResultSuccess struct {
	Bundle *smith_v1.Bundle
}

func (*EntangleResultSuccess) StatusType

func (e *EntangleResultSuccess) StatusType() EntangleResultType

type EntangleResultType

type EntangleResultType string

type Entangler

type Entangler struct {
	Plugins         map[voyager.ResourceType]wiringplugin.WiringPlugin
	ClusterLocation voyager.ClusterLocation
	ClusterConfig   wiringplugin.ClusterConfig
	Tags            TagGenerator
}

func (*Entangler) Entangle

func (en *Entangler) Entangle(state *orch_v1.State, context *EntangleContext) EntangleResult

func (*Entangler) Status

func (en *Entangler) Status(resource *orch_v1.StateResource, context *StatusContext) StatusResult

type StatusContext

type StatusContext struct {
	// BundleResources is the list of resources and their statuses in Bundle.
	// Only resources for a particular StateResource are in the list.
	BundleResources []BundleResource
	// PluginStatuses is a list of statuses for Smith plugins used in a Bundle.
	PluginStatuses []smith_v1.PluginStatus `json:"pluginStatuses,omitempty"`
}

StatusContext contains information that is required by status autowiring.

type StatusResult

type StatusResult interface {
	StatusType() StatusResultType
}

type StatusResultFailure

type StatusResultFailure struct {
	Error           error
	IsExternalError bool
}

func (*StatusResultFailure) StatusType

func (e *StatusResultFailure) StatusType() StatusResultType

type StatusResultSuccess

type StatusResultSuccess struct {
	ResourceStatusData orch_v1.ResourceStatusData
}

func (*StatusResultSuccess) StatusType

func (e *StatusResultSuccess) StatusType() StatusResultType

type StatusResultType

type StatusResultType string

type TagGenerator

type TagGenerator func(
	clusterLocation voyager.ClusterLocation,
	clusterConfig wiringplugin.ClusterConfig,
	location voyager.Location,
	serviceName voyager.ServiceName,
	properties orch_meta.ServiceProperties,
) map[voyager.Tag]string

type TagNames

type TagNames struct {
	ServiceNameTag     voyager.Tag
	BusinessUnitTag    voyager.Tag
	ResourceOwnerTag   voyager.Tag
	PlatformTag        voyager.Tag
	EnvironmentTypeTag voyager.Tag
}

Directories

Path Synopsis
Package aws implements autowiring for the osb-aws-provider (Atlassian specific) This provider is just the old resource-provisioning service with an OSB interface slapped on.
Package aws implements autowiring for the osb-aws-provider (Atlassian specific) This provider is just the old resource-provisioning service with an OSB interface slapped on.
ec2compute
v2
api
api
Package wiringplugin provides the wiring-related types surrounding "WiringPlugin"
Package wiringplugin provides the wiring-related types surrounding "WiringPlugin"
iam
oap
osb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL