Documentation ¶
Index ¶
- Constants
- func GenerateTgName(spec TargetGroupSpec) string
- func TagFieldsMatch(spec TargetGroupSpec, tags TargetGroupTagFields) bool
- func TagsFromTGTagFields(tagFields TargetGroupTagFields) map[string]*string
- func TgNamePrefix(spec TargetGroupSpec) string
- type AccessLogSubscription
- type AccessLogSubscriptionSpec
- type AccessLogSubscriptionStatus
- type DefaultAction
- type IAMAuthPolicy
- type IAMAuthPolicyStatus
- type K8SSourceType
- type Listener
- type ListenerSpec
- type ListenerStatus
- type RouteType
- type Rule
- type RuleAction
- type RuleSpec
- type RuleStatus
- type RuleTargetGroup
- type Service
- type ServiceNetwork
- type ServiceNetworkSpec
- type ServiceNetworkStatus
- type ServiceSpec
- type ServiceStatus
- type ServiceTagFields
- type SourceType
- type SvcImportTargetGroup
- type Target
- type TargetGroup
- type TargetGroupSpec
- type TargetGroupStatus
- type TargetGroupTagFields
- type TargetGroupType
- type Targets
- type TargetsSpec
Constants ¶
View Source
const ( MaxRulePriority = 100 InvalidBackendRefTgId = "INVALID" DefaultActionFixedResponseStatusCode = 404 )
View Source
const ( K8SServiceNetworkOwnedByVPC = "K8SServiceNetworkOwnedByVPC" K8SServiceOwnedByVPC = "K8SServiceOwnedByVPC" )
View Source
const ( K8SClusterNameKey = aws.TagBase + "ClusterName" K8SServiceNameKey = aws.TagBase + "ServiceName" K8SServiceNamespaceKey = aws.TagBase + "ServiceNamespace" K8SRouteNameKey = aws.TagBase + "RouteName" K8SRouteNamespaceKey = aws.TagBase + "RouteNamespace" K8SSourceTypeKey = aws.TagBase + "SourceTypeKey" K8SProtocolVersionKey = aws.TagBase + "ProtocolVersion" // Service specific tags K8SRouteTypeKey = aws.TagBase + "RouteType" MaxNamespaceLength = 55 MaxNameLength = 55 RandomSuffixLength = 10 )
View Source
const ( TargetGroupTypeIP TargetGroupType = "IP" SourceTypeSvcExport K8SSourceType = "ServiceExport" SourceTypeHTTPRoute K8SSourceType = "HTTPRoute" SourceTypeGRPCRoute K8SSourceType = "GRPCRoute" SourceTypeTLSRoute K8SSourceType = "TLSRoute" SourceTypeInvalid K8SSourceType = "INVALID" )
View Source
const ( ServiceNetworkType = "ServiceNetwork" ServiceType = "Service" )
View Source
const AccessLogPolicyTagKey = aws.TagBase + "AccessLogPolicy"
Variables ¶
This section is empty.
Functions ¶
func GenerateTgName ¶ added in v0.0.18
func GenerateTgName(spec TargetGroupSpec) string
func TagFieldsMatch ¶ added in v0.0.18
func TagFieldsMatch(spec TargetGroupSpec, tags TargetGroupTagFields) bool
func TagsFromTGTagFields ¶ added in v1.0.0
func TagsFromTGTagFields(tagFields TargetGroupTagFields) map[string]*string
func TgNamePrefix ¶ added in v0.0.18
func TgNamePrefix(spec TargetGroupSpec) string
Types ¶
type AccessLogSubscription ¶ added in v0.0.18
type AccessLogSubscription struct { core.ResourceMeta `json:"-"` Spec AccessLogSubscriptionSpec `json:"spec"` Status *AccessLogSubscriptionStatus `json:"status,omitempty"` }
func NewAccessLogSubscription ¶ added in v0.0.18
func NewAccessLogSubscription( stack core.Stack, spec AccessLogSubscriptionSpec, status *AccessLogSubscriptionStatus, ) *AccessLogSubscription
type AccessLogSubscriptionSpec ¶ added in v0.0.18
type AccessLogSubscriptionSpec struct { SourceType SourceType SourceName string DestinationArn string ALPNamespacedName types.NamespacedName EventType core.EventType }
type AccessLogSubscriptionStatus ¶ added in v0.0.18
type AccessLogSubscriptionStatus struct {
Arn string `json:"arn"`
}
type DefaultAction ¶
type DefaultAction struct { FixedResponseStatusCode *int64 `json:"fixedresponsestatuscode"` Forward *RuleAction `json:"forward"` }
type IAMAuthPolicy ¶ added in v0.0.18
func NewIAMAuthPolicy ¶ added in v0.0.18
func NewIAMAuthPolicy(k8sPolicy *anv1alpha1.IAMAuthPolicy) IAMAuthPolicy
type IAMAuthPolicyStatus ¶ added in v0.0.18
type IAMAuthPolicyStatus struct {
ResourceId string
}
type K8SSourceType ¶ added in v0.0.18
type K8SSourceType string
func GetParentRefType ¶ added in v0.0.18
func GetParentRefType(s string) K8SSourceType
type Listener ¶
type Listener struct { core.ResourceMeta `json:"-"` Spec ListenerSpec `json:"spec"` Status *ListenerStatus `json:"status,omitempty"` }
func NewListener ¶
func NewListener(stack core.Stack, spec ListenerSpec) (*Listener, error)
type ListenerSpec ¶
type ListenerSpec struct { StackServiceId string `json:"stackserviceid"` K8SRouteName string `json:"k8sroutename"` K8SRouteNamespace string `json:"k8sroutenamespace"` Port int64 `json:"port"` Protocol string `json:"protocol"` DefaultAction *DefaultAction `json:"defaultaction"` }
func (*ListenerSpec) Validate ¶ added in v1.0.6
func (spec *ListenerSpec) Validate() error
type ListenerStatus ¶
type Rule ¶
type Rule struct { core.ResourceMeta `json:"-"` Spec RuleSpec `json:"spec"` Status *RuleStatus `json:"status,omitempty"` }
type RuleAction ¶
type RuleAction struct {
TargetGroups []*RuleTargetGroup `json:"ruletarget"`
}
type RuleSpec ¶
type RuleSpec struct { StackListenerId string `json:"stacklistenerid"` PathMatchValue string `json:"pathmatchvalue"` PathMatchExact bool `json:"pathmatchexact"` PathMatchPrefix bool `json:"pathmatchprefix"` MatchedHeaders []vpclattice.HeaderMatch `json:"matchedheaders"` Method string `json:"method"` Priority int64 `json:"priority"` Action RuleAction `json:"action"` CreateTime time.Time `json:"createtime"` }
type RuleStatus ¶
type RuleStatus struct { Name string `json:"name"` Arn string `json:"arn"` Id string `json:"id"` ServiceId string `json:"serviceid"` ListenerId string `json:"listenerid"` // we submit priority updates as a batch after all rules have been created/modified // this ensures we do not set the same priority on two rules at the same time // we have the Priority field here for convenience in these scenarios, // so we can check for differences and update as a batch when needed Priority int64 `json:"priority"` }
type RuleTargetGroup ¶
type RuleTargetGroup struct { StackTargetGroupId string `json:"stacktargetgroupid"` SvcImportTG *SvcImportTargetGroup `json:"svcimporttg"` LatticeTgId string `json:"latticetgid"` Weight int64 `json:"weight"` }
type Service ¶
type Service struct { core.ResourceMeta `json:"-"` Spec ServiceSpec `json:"spec"` Status *ServiceStatus `json:"status,omitempty"` IsDeleted bool `json:"isdeleted"` }
func NewLatticeService ¶
func NewLatticeService(stack core.Stack, spec ServiceSpec) (*Service, error)
func (*Service) LatticeServiceName ¶ added in v0.0.17
type ServiceNetwork ¶
type ServiceNetwork struct { core.ResourceMeta `json:"-"` Spec ServiceNetworkSpec `json:"spec"` Status *ServiceNetworkStatus `json:"status,omitempty"` }
func NewServiceNetwork ¶
func NewServiceNetwork(stack core.Stack, id string, spec ServiceNetworkSpec) *ServiceNetwork
type ServiceNetworkSpec ¶
type ServiceNetworkStatus ¶
type ServiceSpec ¶
type ServiceSpec struct { ServiceTagFields ServiceNetworkNames []string `json:"servicenetworkhnames"` CustomerDomainName string `json:"customerdomainname"` CustomerCertARN string `json:"customercertarn"` }
func (*ServiceSpec) LatticeServiceName ¶ added in v0.0.18
func (s *ServiceSpec) LatticeServiceName() string
type ServiceStatus ¶
type ServiceTagFields ¶ added in v0.0.18
func ServiceTagFieldsFromTags ¶ added in v0.0.18
func ServiceTagFieldsFromTags(tags map[string]*string) ServiceTagFields
func (*ServiceTagFields) ToTags ¶ added in v0.0.18
func (t *ServiceTagFields) ToTags() services.Tags
type SourceType ¶ added in v0.0.18
type SourceType string
const ( ServiceNetworkSourceType SourceType = "ServiceNetwork" ServiceSourceType SourceType = "Service" )
type SvcImportTargetGroup ¶ added in v0.0.18
type Target ¶
type Target struct { TargetIP string `json:"targetip"` Port int64 `json:"port"` Ready bool `json:"ready"` TargetRef types.NamespacedName }
type TargetGroup ¶
type TargetGroup struct { core.ResourceMeta `json:"-"` Spec TargetGroupSpec `json:"spec"` Status *TargetGroupStatus `json:"status,omitempty"` IsDeleted bool `json:"isdeleted"` }
func NewTargetGroup ¶
func NewTargetGroup(stack core.Stack, spec TargetGroupSpec) (*TargetGroup, error)
type TargetGroupSpec ¶
type TargetGroupSpec struct { VpcId string `json:"vpcid"` Type TargetGroupType `json:"type"` Port int32 `json:"port"` Protocol string `json:"protocol"` ProtocolVersion string `json:"protocolversion"` IpAddressType string `json:"ipaddresstype"` HealthCheckConfig *vpclattice.HealthCheckConfig `json:"healthcheckconfig"` TargetGroupTagFields }
func (*TargetGroupSpec) Validate ¶ added in v0.0.18
func (t *TargetGroupSpec) Validate() error
type TargetGroupStatus ¶
type TargetGroupTagFields ¶ added in v0.0.18
type TargetGroupTagFields struct { K8SClusterName string `json:"k8sclustername"` K8SSourceType K8SSourceType `json:"k8ssourcetype"` K8SServiceName string `json:"k8sservicename"` K8SServiceNamespace string `json:"k8sservicenamespace"` K8SRouteName string `json:"k8sroutename"` K8SRouteNamespace string `json:"k8sroutenamespace"` K8SProtocolVersion string `json:"k8sprotocolversion"` }
func TGTagFieldsFromTags ¶ added in v0.0.18
func TGTagFieldsFromTags(tags map[string]*string) TargetGroupTagFields
func (*TargetGroupTagFields) IsSourceTypeRoute ¶ added in v0.0.18
func (t *TargetGroupTagFields) IsSourceTypeRoute() bool
func (*TargetGroupTagFields) IsSourceTypeServiceExport ¶ added in v0.0.18
func (t *TargetGroupTagFields) IsSourceTypeServiceExport() bool
type TargetGroupType ¶
type TargetGroupType string
type Targets ¶
type Targets struct { core.ResourceMeta `json:"-"` Spec TargetsSpec `json:"spec"` }
func NewTargets ¶
func NewTargets(stack core.Stack, spec TargetsSpec) (*Targets, error)
type TargetsSpec ¶
type TargetsSpec struct { StackTargetGroupId string `json:"stacktargetgroupid"` TargetList []Target `json:"targetlist"` }
unlike target groups, which can reference a service export, targets are always sourced from the local cluster. When we update targets, we find all the target groups linked to the specific service
Click to show internal directories.
Click to hide internal directories.