Documentation ¶
Index ¶
- type RemoveManagedRoutesArgs
- type RpcTrafficRouterPlugin
- type SetHeaderArgs
- type SetMirrorArgs
- type SetWeightAndVerifyWeightArgs
- type TrafficRouterPlugin
- type TrafficRouterPluginRPC
- func (g *TrafficRouterPluginRPC) InitPlugin() types.RpcError
- func (g *TrafficRouterPluginRPC) RemoveManagedRoutes(rollout *v1alpha1.Rollout) types.RpcError
- func (g *TrafficRouterPluginRPC) SetHeaderRoute(rollout *v1alpha1.Rollout, setHeaderRoute *v1alpha1.SetHeaderRoute) types.RpcError
- func (g *TrafficRouterPluginRPC) SetMirrorRoute(rollout *v1alpha1.Rollout, setMirrorRoute *v1alpha1.SetMirrorRoute) types.RpcError
- func (g *TrafficRouterPluginRPC) SetWeight(rollout *v1alpha1.Rollout, desiredWeight int32, ...) types.RpcError
- func (g *TrafficRouterPluginRPC) Type() string
- func (g *TrafficRouterPluginRPC) UpdateHash(rollout *v1alpha1.Rollout, canaryHash string, stableHash string, ...) types.RpcError
- func (g *TrafficRouterPluginRPC) VerifyWeight(rollout *v1alpha1.Rollout, desiredWeight int32, ...) (types.RpcVerified, types.RpcError)
- type TrafficRouterRPCServer
- func (s *TrafficRouterRPCServer) InitPlugin(args interface{}, resp *types.RpcError) error
- func (s *TrafficRouterRPCServer) RemoveManagedRoutes(args interface{}, resp *types.RpcError) error
- func (s *TrafficRouterRPCServer) SetHeaderRoute(args interface{}, resp *types.RpcError) error
- func (s *TrafficRouterRPCServer) SetMirrorRoute(args interface{}, resp *types.RpcError) error
- func (s *TrafficRouterRPCServer) SetWeight(args interface{}, resp *types.RpcError) error
- func (s *TrafficRouterRPCServer) Type(args interface{}, resp *string) error
- func (s *TrafficRouterRPCServer) UpdateHash(args interface{}, resp *types.RpcError) error
- func (s *TrafficRouterRPCServer) VerifyWeight(args interface{}, resp *VerifyWeightResponse) error
- type UpdateHashArgs
- type VerifyWeightResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RemoveManagedRoutesArgs ¶
type RpcTrafficRouterPlugin ¶
type RpcTrafficRouterPlugin struct { // Impl Injection Impl TrafficRouterPlugin }
RpcTrafficRouterPlugin This is the implementation of plugin.Plugin so we can serve/consume
This has two methods: Server must return an RPC server for this plugin type. We construct a MetricsRPCServer for this.
Client must return an implementation of our interface that communicates over an RPC client. We return MetricsPluginRPC for this.
Ignore MuxBroker. That is used to create more multiplexed streams on our plugin connection and is a more advanced use case.
func (RpcTrafficRouterPlugin) Client ¶
func (RpcTrafficRouterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*RpcTrafficRouterPlugin) Server ¶
func (p *RpcTrafficRouterPlugin) Server(*plugin.MuxBroker) (interface{}, error)
type SetHeaderArgs ¶
type SetHeaderArgs struct { Rollout v1alpha1.Rollout SetHeaderRoute v1alpha1.SetHeaderRoute }
type SetMirrorArgs ¶
type SetMirrorArgs struct { Rollout v1alpha1.Rollout SetMirrorRoute v1alpha1.SetMirrorRoute }
type SetWeightAndVerifyWeightArgs ¶
type SetWeightAndVerifyWeightArgs struct { Rollout v1alpha1.Rollout DesiredWeight int32 AdditionalDestinations []v1alpha1.WeightDestination }
type TrafficRouterPlugin ¶
type TrafficRouterPlugin interface { InitPlugin() types.RpcError types.RpcTrafficRoutingReconciler }
TrafficRouterPlugin is the interface that we're exposing as a plugin. It needs to match metricproviders.Providers but we can not import that package because it would create a circular dependency.
type TrafficRouterPluginRPC ¶
type TrafficRouterPluginRPC struct {
// contains filtered or unexported fields
}
TrafficRouterPluginRPC Here is an implementation that talks over RPC
func (*TrafficRouterPluginRPC) InitPlugin ¶
func (g *TrafficRouterPluginRPC) InitPlugin() types.RpcError
NewTrafficRouterPlugin this is the client aka the controller side function that calls the server side rpc (plugin) this gets called once during startup of the plugin and can be used to set up informers or k8s clients etc.
func (*TrafficRouterPluginRPC) RemoveManagedRoutes ¶
func (g *TrafficRouterPluginRPC) RemoveManagedRoutes(rollout *v1alpha1.Rollout) types.RpcError
RemoveAllRoutes Removes all routes that are managed by rollouts by looking at spec.strategy.canary.trafficRouting.managedRoutes
func (*TrafficRouterPluginRPC) SetHeaderRoute ¶
func (g *TrafficRouterPluginRPC) SetHeaderRoute(rollout *v1alpha1.Rollout, setHeaderRoute *v1alpha1.SetHeaderRoute) types.RpcError
SetHeaderRoute sets the header routing step
func (*TrafficRouterPluginRPC) SetMirrorRoute ¶
func (g *TrafficRouterPluginRPC) SetMirrorRoute(rollout *v1alpha1.Rollout, setMirrorRoute *v1alpha1.SetMirrorRoute) types.RpcError
SetMirrorRoute sets up the traffic router to mirror traffic to a service
func (*TrafficRouterPluginRPC) SetWeight ¶
func (g *TrafficRouterPluginRPC) SetWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) types.RpcError
SetWeight sets the canary weight to the desired weight
func (*TrafficRouterPluginRPC) Type ¶
func (g *TrafficRouterPluginRPC) Type() string
Type returns the type of the traffic routing reconciler
func (*TrafficRouterPluginRPC) UpdateHash ¶
func (g *TrafficRouterPluginRPC) UpdateHash(rollout *v1alpha1.Rollout, canaryHash string, stableHash string, additionalDestinations []v1alpha1.WeightDestination) types.RpcError
UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes
func (*TrafficRouterPluginRPC) VerifyWeight ¶
func (g *TrafficRouterPluginRPC) VerifyWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) (types.RpcVerified, types.RpcError)
VerifyWeight returns true if the canary is at the desired weight and additionalDestinations are at the weights specified Returns nil if weight verification is not supported or not applicable
type TrafficRouterRPCServer ¶
type TrafficRouterRPCServer struct { // This is the real implementation Impl TrafficRouterPlugin }
TrafficRouterRPCServer Here is the RPC server that MetricsPluginRPC talks to, conforming to the requirements of net/rpc
func (*TrafficRouterRPCServer) InitPlugin ¶
func (s *TrafficRouterRPCServer) InitPlugin(args interface{}, resp *types.RpcError) error
InitPlugin this is the server aka the controller side function that receives calls from the client side rpc (controller) this gets called once during startup of the plugin and can be used to set up informers or k8s clients etc.
func (*TrafficRouterRPCServer) RemoveManagedRoutes ¶
func (s *TrafficRouterRPCServer) RemoveManagedRoutes(args interface{}, resp *types.RpcError) error
RemoveAllRoutes Removes all routes that are managed by rollouts by looking at spec.strategy.canary.trafficRouting.managedRoutes
func (*TrafficRouterRPCServer) SetHeaderRoute ¶
func (s *TrafficRouterRPCServer) SetHeaderRoute(args interface{}, resp *types.RpcError) error
SetHeaderRoute sets the header routing step
func (*TrafficRouterRPCServer) SetMirrorRoute ¶
func (s *TrafficRouterRPCServer) SetMirrorRoute(args interface{}, resp *types.RpcError) error
SetMirrorRoute sets up the traffic router to mirror traffic to a service
func (*TrafficRouterRPCServer) SetWeight ¶
func (s *TrafficRouterRPCServer) SetWeight(args interface{}, resp *types.RpcError) error
SetWeight sets the canary weight to the desired weight
func (*TrafficRouterRPCServer) Type ¶
func (s *TrafficRouterRPCServer) Type(args interface{}, resp *string) error
Type returns the type of the traffic routing reconciler
func (*TrafficRouterRPCServer) UpdateHash ¶
func (s *TrafficRouterRPCServer) UpdateHash(args interface{}, resp *types.RpcError) error
UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes
func (*TrafficRouterRPCServer) VerifyWeight ¶
func (s *TrafficRouterRPCServer) VerifyWeight(args interface{}, resp *VerifyWeightResponse) error
VerifyWeight returns true if the canary is at the desired weight and additionalDestinations are at the weights specified Returns nil if weight verification is not supported or not applicable
type UpdateHashArgs ¶
type VerifyWeightResponse ¶
type VerifyWeightResponse struct { Verified types.RpcVerified Err types.RpcError }