oap

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alarms

func Alarms(resourceSpec *runtime.RawExtension) (json.RawMessage, error)

func BuildAttributes

func BuildAttributes(resourceSpec *runtime.RawExtension, resourceDefaults *runtime.RawExtension) (map[string]interface{}, bool, bool, error)

From a resource spec, performs FilterAttributes() and then applies defaults.

func FilterAttributes

func FilterAttributes(resourceSpec *runtime.RawExtension) (map[string]interface{}, error)

From a resource spec, filters out the serviceName, instanceId and alarms.

func ResourceName

func ResourceName(resourceSpec *runtime.RawExtension) (string, error)

func ServiceName

func ServiceName(resourceSpec *runtime.RawExtension) (voyager.ServiceName, error)

Gets serviceName from resource's spec if present or "" otherwise If the spec is empty or does not contain the ServiceName, this returns the empty string.

func TemplateName

func TemplateName(resourceSpec *runtime.RawExtension) (string, bool, bool, error)

Types

type CfnTemplate

type CfnTemplate string

type MicrosAlarmSpec

type MicrosAlarmSpec struct {
	Type     string `json:"type"`
	Priority string `json:"priority"`
	Endpoint string `json:"endpoint"`
	Consumer string `json:"consumer"`
}

func PagerdutyAlarmEndpoints

func PagerdutyAlarmEndpoints(highPriorityPagerdutyEndpoint string, lowPriorityPagerdutyEndpoint string) []MicrosAlarmSpec

type RPSResource

type RPSResource struct {
	Type string `json:"type"`
	Name string `json:"name"`

	Attributes json.RawMessage `json:"attributes,omitempty"`
	Alarms     json.RawMessage `json:"alarms,omitempty"`
}

type ResourceType

type ResourceType string

type ServiceEnvironment

type ServiceEnvironment struct {
	NotificationEmail     string                 `json:"notificationEmail,omitempty"`
	AlarmEndpoints        []MicrosAlarmSpec      `json:"alarmEndpoints,omitempty"`
	Tags                  map[voyager.Tag]string `json:"tags,omitempty"`
	ServiceSecurityGroup  string                 `json:"serviceSecurityGroup,omitempty"`
	PrimaryVpcEnvironment *VPCEnvironment        `json:"primaryVpcEnvironment,omitempty"`
	Fallback              *bool                  `json:"fallback,omitempty"`
}

func MakeServiceEnvironmentFromContext

func MakeServiceEnvironmentFromContext(context *wiringplugin.WiringContext, vpc *VPCEnvironment) *ServiceEnvironment

type ServiceInstanceSpec

type ServiceInstanceSpec struct {
	ServiceName voyager.ServiceName `json:"serviceName"`
	Resource    RPSResource         `json:"resource"`
	Environment ServiceEnvironment  `json:"environment"`
}

type VPCEnvironment

type VPCEnvironment struct {
	VPCID                 string         `json:"vpcId,omitempty"`
	PrivateDNSZone        string         `json:"privateDnsZone,omitempty"`
	PrivatePaasDNSZone    string         `json:"privatePaasDnsZone,omitempty"`
	InstanceSecurityGroup string         `json:"instanceSecurityGroup,omitempty"`
	JumpboxSecurityGroup  string         `json:"jumpboxSecurityGroup,omitempty"`
	SSLCertificateID      string         `json:"sslCertificateId,omitempty"`
	Label                 voyager.Label  `json:"label,omitempty"`
	AppSubnets            []string       `json:"appSubnets,omitempty"`
	Zones                 []string       `json:"zones,omitempty"`
	Region                voyager.Region `json:"region,omitempty"`
	EMRSubnet             string         `json:"emrSubnet,omitempty"`
}

Jump to

Keyboard shortcuts

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