Documentation
¶
Index ¶
- Variables
- type Accelerator
- type AcceleratorInput
- type AcceleratorPatch
- type Attachment
- type AttachmentInput
- type AttachmentPatch
- type AttributesPatch
- type ByoipCidr
- type CrossAccountResource
- type CustomGroupInput
- type Destination
- type DestinationMapping
- type Endpoint
- type EndpointConfig
- type EndpointGroup
- type EndpointGroupInput
- type Event
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddCustomRoutingEndpoints(arn string, cfgs []EndpointConfig) (*EndpointGroup, []Endpoint, error)
- func (b *InMemoryBackend) AddEndpoints(arn string, cfgs []EndpointConfig) (*EndpointGroup, []Endpoint, error)
- func (b *InMemoryBackend) AdvertiseByoipCidr(cidr string) (*ByoipCidr, error)
- func (b *InMemoryBackend) ChangeCustomRoutingTraffic(c TrafficChange) error
- func (b *InMemoryBackend) CreateAccelerator(in AcceleratorInput) (*Accelerator, error)
- func (b *InMemoryBackend) CreateCrossAccountAttachment(in AttachmentInput) (*Attachment, error)
- func (b *InMemoryBackend) CreateCustomRoutingEndpointGroup(listenerARN string, in CustomGroupInput) (*EndpointGroup, error)
- func (b *InMemoryBackend) CreateEndpointGroup(listenerARN string, in EndpointGroupInput) (*EndpointGroup, error)
- func (b *InMemoryBackend) CreateListener(acceleratorARN string, in ListenerInput) (*Listener, error)
- func (b *InMemoryBackend) DeleteAccelerator(arn string, custom bool) error
- func (b *InMemoryBackend) DeleteCrossAccountAttachment(arn string) error
- func (b *InMemoryBackend) DeleteEndpointGroup(arn string, custom bool) error
- func (b *InMemoryBackend) DeleteListener(arn string, custom bool) error
- func (b *InMemoryBackend) DeprovisionByoipCidr(cidr string) (*ByoipCidr, error)
- func (b *InMemoryBackend) GetAccelerator(arn string, custom bool) (*Accelerator, error)
- func (b *InMemoryBackend) GetAcceleratorAttributes(arn string, custom bool) (*Accelerator, error)
- func (b *InMemoryBackend) GetCrossAccountAttachment(arn string) (*Attachment, error)
- func (b *InMemoryBackend) GetEndpointGroup(arn string, custom bool) (*EndpointGroup, error)
- func (b *InMemoryBackend) GetListener(arn string, custom bool) (*Listener, error)
- func (b *InMemoryBackend) ListAccelerators(custom bool, token string, maxResults *int32) (page.Page[*Accelerator], error)
- func (b *InMemoryBackend) ListByoipCidrs(token string, maxResults *int32) (page.Page[*ByoipCidr], error)
- func (b *InMemoryBackend) ListCrossAccountAttachments(caller, token string, maxResults *int32) (page.Page[*Attachment], error)
- func (b *InMemoryBackend) ListCrossAccountResourceAccounts(caller string) []string
- func (b *InMemoryBackend) ListCrossAccountResources(caller, owner, acceleratorARN, token string, maxResults *int32) (page.Page[CrossAccountResource], error)
- func (b *InMemoryBackend) ListCustomRoutingPortMappings(acceleratorARN, groupARN, token string, maxResults *int32) ([]PortMapping, string, error)
- func (b *InMemoryBackend) ListCustomRoutingPortMappingsByDestination(endpointID, address, token string, maxResults *int32) (page.Page[DestinationMapping], error)
- func (b *InMemoryBackend) ListEndpointGroups(listenerARN string, custom bool, token string, maxResults *int32) (page.Page[*EndpointGroup], error)
- func (b *InMemoryBackend) ListListeners(acceleratorARN string, custom bool, token string, maxResults *int32) (page.Page[*Listener], error)
- func (b *InMemoryBackend) ListTagsForResource(arn string) (map[string]string, error)
- func (b *InMemoryBackend) ProvisionByoipCidr(cidr, message, signature string) (*ByoipCidr, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RemoveCustomRoutingEndpoints(arn string, ids []string) error
- func (b *InMemoryBackend) RemoveEndpoints(arn string, ids []string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SetLifecycleDelay(d time.Duration)
- func (b *InMemoryBackend) SetSubnetResolver(r SubnetResolver)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TagResource(arn string, add map[string]string) error
- func (b *InMemoryBackend) UntagResource(arn string, keys []string) error
- func (b *InMemoryBackend) UpdateAccelerator(arn string, custom bool, p AcceleratorPatch) (*Accelerator, error)
- func (b *InMemoryBackend) UpdateAcceleratorAttributes(arn string, custom bool, p AttributesPatch) (*Accelerator, error)
- func (b *InMemoryBackend) UpdateCrossAccountAttachment(arn string, p AttachmentPatch) (*Attachment, error)
- func (b *InMemoryBackend) UpdateEndpointGroup(arn string, in EndpointGroupInput) (*EndpointGroup, error)
- func (b *InMemoryBackend) UpdateListener(arn string, in ListenerInput) (*Listener, error)
- func (b *InMemoryBackend) WithdrawByoipCidr(cidr string) (*ByoipCidr, error)
- type Listener
- type ListenerInput
- type PortMapping
- type PortOverride
- type PortRange
- type Provider
- type Resource
- type SubnetResolver
- type TrafficChange
- type TrafficRule
Constants ¶
This section is empty.
Variables ¶
var ( ErrAcceleratorNotDisabled = errors.New("the accelerator must be disabled") ErrAcceleratorNotFound = errors.New("accelerator not found") ErrAssociatedEndpointGroupFound = errors.New("the listener has endpoint groups") ErrAssociatedListenerFound = errors.New("the accelerator has listeners") ErrAttachmentNotFound = errors.New("attachment not found") ErrByoipCidrNotFound = errors.New("byoip cidr not found") ErrConflict = errors.New("conflict") ErrEndpointAlreadyExists = errors.New("endpoint already exists") ErrEndpointGroupAlreadyExists = errors.New("endpoint group already exists") ErrEndpointGroupNotFound = errors.New("endpoint group not found") ErrEndpointNotFound = errors.New("endpoint not found") ErrIncorrectCidrState = errors.New("incorrect cidr state") ErrInternalServiceError = errors.New("internal service error") ErrInvalidArgument = errors.New("invalid argument") ErrInvalidNextToken = errors.New("invalid next token") ErrInvalidPortRange = errors.New("invalid port range") ErrLimitExceeded = errors.New("limit exceeded") ErrListenerNotFound = errors.New("listener not found") )
Sentinels, one per exception in the pinned SDK's error set.
Functions ¶
This section is empty.
Types ¶
type Accelerator ¶
type Accelerator struct {
CreatedTime time.Time `json:"createdTime"`
LastModifiedTime time.Time `json:"lastModifiedTime"`
PendingUntil time.Time `json:"pendingUntil"`
Tags map[string]string `json:"tags,omitempty"`
ARN string `json:"arn"`
Name string `json:"name"`
IPAddressType string `json:"ipAddressType"`
DNSName string `json:"dnsName"`
FlowLogsS3Bucket string `json:"flowLogsS3Bucket,omitempty"`
FlowLogsS3Prefix string `json:"flowLogsS3Prefix,omitempty"`
Status string `json:"-"`
IPv4 []string `json:"ipv4"`
IPv6 []string `json:"ipv6,omitempty"`
Events []Event `json:"events,omitempty"`
Seq int64 `json:"seq"`
Enabled bool `json:"enabled"`
Custom bool `json:"custom,omitempty"`
FlowLogsEnabled bool `json:"flowLogsEnabled,omitempty"`
}
Accelerator is a standard or custom routing accelerator.
func (*Accelerator) DualStackDNSName ¶
func (a *Accelerator) DualStackDNSName() string
DualStackDNSName returns the dual-stack DNS name, or empty for an IPv4-only accelerator.
type AcceleratorInput ¶
type AcceleratorInput struct {
Tags map[string]string
Name string
IPAddressType string
IPAddresses []string
Enabled bool
Custom bool
}
AcceleratorInput holds CreateAccelerator parameters.
type AcceleratorPatch ¶
type AcceleratorPatch struct {
Name *string
Enabled *bool
IPAddressType *string
IPAddresses []string
}
AcceleratorPatch holds UpdateAccelerator parameters; nil fields are unchanged.
type Attachment ¶
type Attachment struct {
CreatedTime time.Time `json:"createdTime"`
LastModifiedTime time.Time `json:"lastModifiedTime"`
Tags map[string]string `json:"tags,omitempty"`
ARN string `json:"arn"`
Name string `json:"name"`
OwnerAccountID string `json:"ownerAccountId"`
Principals []string `json:"principals,omitempty"`
Resources []Resource `json:"resources,omitempty"`
Seq int64 `json:"seq"`
}
Attachment is a cross-account attachment.
type AttachmentInput ¶
type AttachmentInput struct {
Tags map[string]string
Name string
Owner string
Principals []string
Resources []Resource
}
AttachmentInput holds CreateCrossAccountAttachment parameters.
type AttachmentPatch ¶
type AttachmentPatch struct {
Name *string
AddPrincipals []string
RemovePrincipals []string
AddResources []Resource
RemoveResources []Resource
}
AttachmentPatch holds UpdateCrossAccountAttachment parameters.
type AttributesPatch ¶
type AttributesPatch struct {
FlowLogsEnabled *bool
FlowLogsS3Bucket *string
FlowLogsS3Prefix *string
}
AttributesPatch holds UpdateAcceleratorAttributes parameters.
type ByoipCidr ¶
type ByoipCidr struct {
PendingUntil time.Time `json:"pendingUntil"`
Cidr string `json:"cidr"`
State string `json:"state"`
Events []Event `json:"events,omitempty"`
}
ByoipCidr is an address range brought to Global Accelerator.
type CrossAccountResource ¶
CrossAccountResource is a shared resource together with its attachment.
type CustomGroupInput ¶
type CustomGroupInput struct {
Region string
Destinations []Destination
}
CustomGroupInput holds CreateCustomRoutingEndpointGroup parameters.
type Destination ¶
type Destination struct {
Protocols []string `json:"protocols"`
FromPort int32 `json:"fromPort"`
ToPort int32 `json:"toPort"`
}
Destination is a custom routing destination port range.
type DestinationMapping ¶
type DestinationMapping struct {
AcceleratorARN string
GroupRegion string
AcceleratorIPs []string
PortMapping
}
DestinationMapping is a PortMapping located by destination, with accelerator context.
type Endpoint ¶
type Endpoint struct {
AddedAt time.Time `json:"addedAt"`
ID string `json:"id"`
AttachmentARN string `json:"attachmentArn,omitempty"`
SubnetCIDR string `json:"subnetCidr,omitempty"`
DefaultState string `json:"defaultState,omitempty"`
HealthState string `json:"-"`
Rules []TrafficRule `json:"rules,omitempty"`
Weight int32 `json:"weight"`
ClientIPPreservation bool `json:"clientIpPreservation"`
}
Endpoint is an endpoint group member; for custom routing it is a VPC subnet.
type EndpointConfig ¶
type EndpointConfig struct {
Weight *int32
ClientIPPreservation *bool
EndpointID string
AttachmentARN string
}
EndpointConfig is one endpoint to add to a standard endpoint group.
type EndpointGroup ¶
type EndpointGroup struct {
HealthCheckPath string `json:"healthCheckPath,omitempty"`
ARN string `json:"arn"`
ListenerARN string `json:"listenerArn"`
Region string `json:"region"`
HealthCheckProtocol string `json:"healthCheckProtocol,omitempty"`
Endpoints []Endpoint `json:"endpoints,omitempty"`
Destinations []Destination `json:"destinations,omitempty"`
PortOverrides []PortOverride `json:"portOverrides,omitempty"`
Seq int64 `json:"seq"`
TrafficDial float32 `json:"trafficDial"`
HealthCheckPort int32 `json:"healthCheckPort"`
HealthCheckInterval int32 `json:"healthCheckInterval"`
ThresholdCount int32 `json:"thresholdCount"`
Custom bool `json:"custom,omitempty"`
}
EndpointGroup is a standard or custom routing endpoint group.
type EndpointGroupInput ¶
type EndpointGroupInput struct {
HealthCheckInterval *int32
HealthCheckPath *string
HealthCheckPort *int32
ThresholdCount *int32
TrafficDial *float32
Region string
HealthCheckProtocol string
Endpoints []EndpointConfig
PortOverrides []PortOverride
}
EndpointGroupInput holds create/update endpoint group parameters; nil fields are unchanged on update.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
// contains filtered or unexported fields
}
Handler serves the Global Accelerator awsjson1.1 API.
func (*Handler) ChaosOperations ¶
ChaosOperations lists the fault-injectable operations.
func (*Handler) ChaosRegions ¶
ChaosRegions lists the regions this handler serves; Global Accelerator is homed in one region.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase service name for fault rules.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name from X-Amz-Target.
func (*Handler) ExtractResource ¶
ExtractResource returns the operation name; the API has no single resource key.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists every routed operation.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the echo handler.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher matches the GlobalAccelerator_V20180706 X-Amz-Target prefix.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is the Global Accelerator state; one coarse lock guards every table.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates an empty backend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the owning account.
func (*InMemoryBackend) AddCustomRoutingEndpoints ¶
func (b *InMemoryBackend) AddCustomRoutingEndpoints( arn string, cfgs []EndpointConfig, ) (*EndpointGroup, []Endpoint, error)
AddCustomRoutingEndpoints adds VPC subnets to a custom routing endpoint group.
func (*InMemoryBackend) AddEndpoints ¶
func (b *InMemoryBackend) AddEndpoints(arn string, cfgs []EndpointConfig) (*EndpointGroup, []Endpoint, error)
AddEndpoints adds endpoints to a standard endpoint group.
func (*InMemoryBackend) AdvertiseByoipCidr ¶
func (b *InMemoryBackend) AdvertiseByoipCidr(cidr string) (*ByoipCidr, error)
AdvertiseByoipCidr starts advertising a READY range.
func (*InMemoryBackend) ChangeCustomRoutingTraffic ¶
func (b *InMemoryBackend) ChangeCustomRoutingTraffic(c TrafficChange) error
ChangeCustomRoutingTraffic applies an Allow/DenyCustomRoutingTraffic request.
func (*InMemoryBackend) CreateAccelerator ¶
func (b *InMemoryBackend) CreateAccelerator(in AcceleratorInput) (*Accelerator, error)
CreateAccelerator creates a standard or custom routing accelerator.
func (*InMemoryBackend) CreateCrossAccountAttachment ¶
func (b *InMemoryBackend) CreateCrossAccountAttachment(in AttachmentInput) (*Attachment, error)
CreateCrossAccountAttachment creates an attachment.
func (*InMemoryBackend) CreateCustomRoutingEndpointGroup ¶
func (b *InMemoryBackend) CreateCustomRoutingEndpointGroup( listenerARN string, in CustomGroupInput, ) (*EndpointGroup, error)
CreateCustomRoutingEndpointGroup creates a custom routing endpoint group.
func (*InMemoryBackend) CreateEndpointGroup ¶
func (b *InMemoryBackend) CreateEndpointGroup(listenerARN string, in EndpointGroupInput) (*EndpointGroup, error)
CreateEndpointGroup creates a standard endpoint group; at most one per Region per listener.
func (*InMemoryBackend) CreateListener ¶
func (b *InMemoryBackend) CreateListener(acceleratorARN string, in ListenerInput) (*Listener, error)
CreateListener adds a listener to an accelerator.
func (*InMemoryBackend) DeleteAccelerator ¶
func (b *InMemoryBackend) DeleteAccelerator(arn string, custom bool) error
DeleteAccelerator removes a disabled accelerator that has no listeners.
func (*InMemoryBackend) DeleteCrossAccountAttachment ¶
func (b *InMemoryBackend) DeleteCrossAccountAttachment(arn string) error
DeleteCrossAccountAttachment removes an attachment no endpoint refers to.
func (*InMemoryBackend) DeleteEndpointGroup ¶
func (b *InMemoryBackend) DeleteEndpointGroup(arn string, custom bool) error
DeleteEndpointGroup removes an endpoint group.
func (*InMemoryBackend) DeleteListener ¶
func (b *InMemoryBackend) DeleteListener(arn string, custom bool) error
DeleteListener removes a listener that has no endpoint groups.
func (*InMemoryBackend) DeprovisionByoipCidr ¶
func (b *InMemoryBackend) DeprovisionByoipCidr(cidr string) (*ByoipCidr, error)
DeprovisionByoipCidr releases a READY range that no accelerator uses.
func (*InMemoryBackend) GetAccelerator ¶
func (b *InMemoryBackend) GetAccelerator(arn string, custom bool) (*Accelerator, error)
GetAccelerator returns one accelerator.
func (*InMemoryBackend) GetAcceleratorAttributes ¶
func (b *InMemoryBackend) GetAcceleratorAttributes(arn string, custom bool) (*Accelerator, error)
GetAcceleratorAttributes returns flow log settings.
func (*InMemoryBackend) GetCrossAccountAttachment ¶
func (b *InMemoryBackend) GetCrossAccountAttachment(arn string) (*Attachment, error)
GetCrossAccountAttachment returns one attachment.
func (*InMemoryBackend) GetEndpointGroup ¶
func (b *InMemoryBackend) GetEndpointGroup(arn string, custom bool) (*EndpointGroup, error)
GetEndpointGroup returns one endpoint group.
func (*InMemoryBackend) GetListener ¶
func (b *InMemoryBackend) GetListener(arn string, custom bool) (*Listener, error)
GetListener returns one listener.
func (*InMemoryBackend) ListAccelerators ¶
func (b *InMemoryBackend) ListAccelerators( custom bool, token string, maxResults *int32, ) (page.Page[*Accelerator], error)
ListAccelerators pages accelerators in creation order.
func (*InMemoryBackend) ListByoipCidrs ¶
func (b *InMemoryBackend) ListByoipCidrs(token string, maxResults *int32) (page.Page[*ByoipCidr], error)
ListByoipCidrs pages the provisioned ranges.
func (*InMemoryBackend) ListCrossAccountAttachments ¶
func (b *InMemoryBackend) ListCrossAccountAttachments( caller, token string, maxResults *int32, ) (page.Page[*Attachment], error)
ListCrossAccountAttachments pages the attachments owned by or shared with the caller.
func (*InMemoryBackend) ListCrossAccountResourceAccounts ¶
func (b *InMemoryBackend) ListCrossAccountResourceAccounts(caller string) []string
ListCrossAccountResourceAccounts returns the owners of attachments shared with caller.
func (*InMemoryBackend) ListCrossAccountResources ¶
func (b *InMemoryBackend) ListCrossAccountResources( caller, owner, acceleratorARN, token string, maxResults *int32, ) (page.Page[CrossAccountResource], error)
ListCrossAccountResources pages resources shared by owner with caller, optionally only those an accelerator uses.
func (*InMemoryBackend) ListCustomRoutingPortMappings ¶
func (b *InMemoryBackend) ListCustomRoutingPortMappings( acceleratorARN, groupARN, token string, maxResults *int32, ) ([]PortMapping, string, error)
ListCustomRoutingPortMappings pages the accelerator's port mappings, optionally for one endpoint group.
func (*InMemoryBackend) ListCustomRoutingPortMappingsByDestination ¶
func (b *InMemoryBackend) ListCustomRoutingPortMappingsByDestination( endpointID, address, token string, maxResults *int32, ) (page.Page[DestinationMapping], error)
ListCustomRoutingPortMappingsByDestination returns every mapping to one destination address in a subnet.
func (*InMemoryBackend) ListEndpointGroups ¶
func (b *InMemoryBackend) ListEndpointGroups( listenerARN string, custom bool, token string, maxResults *int32, ) (page.Page[*EndpointGroup], error)
ListEndpointGroups pages the endpoint groups of a listener.
func (*InMemoryBackend) ListListeners ¶
func (b *InMemoryBackend) ListListeners( acceleratorARN string, custom bool, token string, maxResults *int32, ) (page.Page[*Listener], error)
ListListeners pages the listeners of an accelerator.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(arn string) (map[string]string, error)
ListTagsForResource returns the tags of an accelerator or attachment.
func (*InMemoryBackend) ProvisionByoipCidr ¶
func (b *InMemoryBackend) ProvisionByoipCidr(cidr, message, signature string) (*ByoipCidr, error)
ProvisionByoipCidr starts provisioning an address range.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the home region.
func (*InMemoryBackend) RemoveCustomRoutingEndpoints ¶
func (b *InMemoryBackend) RemoveCustomRoutingEndpoints(arn string, ids []string) error
RemoveCustomRoutingEndpoints removes subnets by ID; every ID must exist.
func (*InMemoryBackend) RemoveEndpoints ¶
func (b *InMemoryBackend) RemoveEndpoints(arn string, ids []string) error
RemoveEndpoints removes endpoints by ID; every ID must exist.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads a snapshot; an incompatible version is discarded.
func (*InMemoryBackend) SetLifecycleDelay ¶
func (b *InMemoryBackend) SetLifecycleDelay(d time.Duration)
SetLifecycleDelay overrides how long accelerators, endpoints and BYOIP ranges stay in a transitional state.
func (*InMemoryBackend) SetSubnetResolver ¶
func (b *InMemoryBackend) SetSubnetResolver(r SubnetResolver)
SetSubnetResolver wires the EC2 lookup used by custom routing endpoints.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(arn string, add map[string]string) error
TagResource adds or replaces tags on an accelerator or attachment.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(arn string, keys []string) error
UntagResource removes tags by key.
func (*InMemoryBackend) UpdateAccelerator ¶
func (b *InMemoryBackend) UpdateAccelerator(arn string, custom bool, p AcceleratorPatch) (*Accelerator, error)
UpdateAccelerator applies a partial update.
func (*InMemoryBackend) UpdateAcceleratorAttributes ¶
func (b *InMemoryBackend) UpdateAcceleratorAttributes( arn string, custom bool, p AttributesPatch, ) (*Accelerator, error)
UpdateAcceleratorAttributes updates flow log settings.
func (*InMemoryBackend) UpdateCrossAccountAttachment ¶
func (b *InMemoryBackend) UpdateCrossAccountAttachment(arn string, p AttachmentPatch) (*Attachment, error)
UpdateCrossAccountAttachment adds and removes principals and resources.
func (*InMemoryBackend) UpdateEndpointGroup ¶
func (b *InMemoryBackend) UpdateEndpointGroup(arn string, in EndpointGroupInput) (*EndpointGroup, error)
UpdateEndpointGroup applies a partial update; a non-nil Endpoints list replaces the members.
func (*InMemoryBackend) UpdateListener ¶
func (b *InMemoryBackend) UpdateListener(arn string, in ListenerInput) (*Listener, error)
UpdateListener changes the supplied listener fields.
func (*InMemoryBackend) WithdrawByoipCidr ¶
func (b *InMemoryBackend) WithdrawByoipCidr(cidr string) (*ByoipCidr, error)
WithdrawByoipCidr stops advertising an ADVERTISING range.
type Listener ¶
type Listener struct {
ARN string `json:"arn"`
AcceleratorARN string `json:"acceleratorArn"`
Protocol string `json:"protocol,omitempty"`
ClientAffinity string `json:"clientAffinity,omitempty"`
PortRanges []PortRange `json:"portRanges"`
Seq int64 `json:"seq"`
Custom bool `json:"custom,omitempty"`
}
Listener is a standard or custom routing listener.
type ListenerInput ¶
type ListenerInput struct {
Protocol string
ClientAffinity string
PortRanges []PortRange
Custom bool
}
ListenerInput holds create/update listener parameters; nil/empty fields are unchanged on update.
type PortMapping ¶
type PortMapping struct {
GroupARN string
EndpointID string
IP string
State string
Protocols []string
AccPort int32
DstPort int32
}
PortMapping is one accelerator-port to destination-socket mapping.
type PortOverride ¶
type PortOverride struct {
ListenerPort int32 `json:"ListenerPort"`
EndpointPort int32 `json:"EndpointPort"`
}
PortOverride maps a listener port to an endpoint port.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for AWS Global Accelerator.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init builds the backend and handler.
type Resource ¶
type Resource struct {
Cidr string `json:"Cidr,omitempty"`
EndpointID string `json:"EndpointId,omitempty"`
Region string `json:"Region,omitempty"`
}
Resource is a cross-account attachment resource.
type SubnetResolver ¶
SubnetResolver looks up the IPv4 CIDR of a VPC subnet for custom routing port mappings.
type TrafficChange ¶
type TrafficChange struct {
EndpointGroupARN string
EndpointID string
State string
Addresses []string
Ports []int32
All bool
}
TrafficChange is an Allow/DenyCustomRoutingTraffic request.
type TrafficRule ¶
type TrafficRule struct {
State string `json:"state"`
Addresses []string `json:"addresses,omitempty"`
Ports []int32 `json:"ports,omitempty"`
}
TrafficRule is one Allow/DenyCustomRoutingTraffic request; later rules win.
Source Files
¶
- accelerators.go
- attachments.go
- byoip.go
- custom_routing.go
- endpoint_groups.go
- errors.go
- handler.go
- handler_accelerators.go
- handler_attachments.go
- handler_byoip.go
- handler_custom_routing.go
- handler_endpoint_groups.go
- handler_listeners.go
- handler_tags.go
- listeners.go
- models.go
- persistence.go
- provider.go
- store.go
- store_setup.go
- tags.go
- validate.go
- wire.go