Documentation ¶
Overview ¶
Package smi implements the Service Mesh Interface (SMI) kubernetes client to observe and retrieve information regarding SMI traffic resources.
Index ¶
- Constants
- func FilterTrafficSplit(trafficSplit *smiSplit.TrafficSplit, options ...TrafficSplitListOption) *smiSplit.TrafficSplit
- func FilterTrafficTarget(trafficTarget *smiAccess.TrafficTarget, options ...TrafficTargetListOption) *smiAccess.TrafficTarget
- func GetSmiClientVersionHTTPHandler() http.Handler
- func HasValidRules(rules []smiAccess.TrafficTargetRule) bool
- func IsValidTrafficTarget(trafficTarget *smiAccess.TrafficTarget) bool
- type TrafficSplitListOpt
- type TrafficSplitListOption
- type TrafficTargetListOpt
- type TrafficTargetListOption
Constants ¶
const ( // ServiceAccountKind is the kind specified for the destination and sources in an SMI TrafficTarget policy ServiceAccountKind = "ServiceAccount" // TCPRouteKind is the kind specified for the TCP route rules in an SMI Traffictarget policy TCPRouteKind = "TCPRoute" // HTTPRouteGroupKind is the kind specified for the HTTP route rules in an SMI Traffictarget policy HTTPRouteGroupKind = "HTTPRouteGroup" )
Variables ¶
This section is empty.
Functions ¶
func FilterTrafficSplit ¶
func FilterTrafficSplit(trafficSplit *smiSplit.TrafficSplit, options ...TrafficSplitListOption) *smiSplit.TrafficSplit
FilterTrafficSplit applies the given TrafficSplitListOption filter on the given TrafficSplit object
func FilterTrafficTarget ¶
func FilterTrafficTarget(trafficTarget *smiAccess.TrafficTarget, options ...TrafficTargetListOption) *smiAccess.TrafficTarget
FilterTrafficTarget applies the given TrafficTargetListOption filter on the given TrafficTarget object
func GetSmiClientVersionHTTPHandler ¶
GetSmiClientVersionHTTPHandler returns an http handler that returns supported smi version information
func HasValidRules ¶
func HasValidRules(rules []smiAccess.TrafficTargetRule) bool
HasValidRules checks if the given SMI TrafficTarget object has valid rules
func IsValidTrafficTarget ¶
func IsValidTrafficTarget(trafficTarget *smiAccess.TrafficTarget) bool
IsValidTrafficTarget checks if the given SMI TrafficTarget object is valid
Types ¶
type TrafficSplitListOpt ¶
type TrafficSplitListOpt struct { ApexService service.MeshService BackendService service.MeshService }
TrafficSplitListOpt specifies the options used to filter TrafficSplit objects as a part of its lister
type TrafficSplitListOption ¶
type TrafficSplitListOption func(o *TrafficSplitListOpt)
TrafficSplitListOption is a function type that implements filters on the TrafficSplit lister
func WithTrafficSplitApexService ¶
func WithTrafficSplitApexService(s service.MeshService) TrafficSplitListOption
WithTrafficSplitApexService applies a filter based on the apex service to the TrafficSplit lister
func WithTrafficSplitBackendService ¶
func WithTrafficSplitBackendService(s service.MeshService) TrafficSplitListOption
WithTrafficSplitBackendService applies a filter based on the backend service to the TrafficSplit lister
type TrafficTargetListOpt ¶
type TrafficTargetListOpt struct {
Destination identity.K8sServiceAccount
}
TrafficTargetListOpt specifies the options used to filter TrafficTarget objects as a part of its lister
type TrafficTargetListOption ¶
type TrafficTargetListOption func(o *TrafficTargetListOpt)
TrafficTargetListOption is a function type that implements filters on TrafficTarget lister
func WithTrafficTargetDestination ¶
func WithTrafficTargetDestination(d identity.K8sServiceAccount) TrafficTargetListOption
WithTrafficTargetDestination applies a filter based on the destination service account to the TrafficTarget lister