routesapi

package module
v0.0.0-...-7dc3cf9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

README

Signadot Routes API Go Client

Overview

This directory contains a Go client of the Signadot Routes API.

Contents

  • A generated Go client.
  • Libraries for destination workload routing.
  • A command for querying the route server.
  • Docs

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WatchOp_name = map[int32]string{
		0: "ADD",
		1: "REMOVE",
		2: "REPLACE",
		3: "SYNCED",
	}
	WatchOp_value = map[string]int32{
		"ADD":     0,
		"REMOVE":  1,
		"REPLACE": 2,
		"SYNCED":  3,
	}
)

Enum value maps for WatchOp.

View Source
var File_routes_proto protoreflect.FileDescriptor
View Source
var Routes_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "routes.Routes",
	HandlerType: (*RoutesServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetWorkloadRoutingRules",
			Handler:    _Routes_GetWorkloadRoutingRules_Handler,
		},
		{
			MethodName: "GetClusterServices",
			Handler:    _Routes_GetClusterServices_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchWorkloadRoutingRules",
			Handler:       _Routes_WatchWorkloadRoutingRules_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "routes.proto",
}

Routes_ServiceDesc is the grpc.ServiceDesc for Routes service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRoutesServer

func RegisterRoutesServer(s grpc.ServiceRegistrar, srv RoutesServer)

Types

type BaselineWorkload

type BaselineWorkload struct {
	Kind      string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

A BaselineWorkload identifies a given baseline workload. In the context of a WorkloadRoutingRuleRequest, all the fields are optional. In the context of a response from the server, all the fields are filled in.

func (*BaselineWorkload) Descriptor deprecated

func (*BaselineWorkload) Descriptor() ([]byte, []int)

Deprecated: Use BaselineWorkload.ProtoReflect.Descriptor instead.

func (*BaselineWorkload) GetKind

func (x *BaselineWorkload) GetKind() string

func (*BaselineWorkload) GetName

func (x *BaselineWorkload) GetName() string

func (*BaselineWorkload) GetNamespace

func (x *BaselineWorkload) GetNamespace() string

func (*BaselineWorkload) ProtoMessage

func (*BaselineWorkload) ProtoMessage()

func (*BaselineWorkload) ProtoReflect

func (x *BaselineWorkload) ProtoReflect() protoreflect.Message

func (*BaselineWorkload) Reset

func (x *BaselineWorkload) Reset()

func (*BaselineWorkload) String

func (x *BaselineWorkload) String() string

type ClientInfo

type ClientInfo struct {
	EnableVirtualWorkloads bool `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

ClientInfo indicates what capabilities the client has. If absent, the minimum capabilities are assumed.

func (*ClientInfo) Descriptor deprecated

func (*ClientInfo) Descriptor() ([]byte, []int)

Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead.

func (*ClientInfo) GetEnableVirtualWorkloads

func (x *ClientInfo) GetEnableVirtualWorkloads() bool

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) ProtoReflect

func (x *ClientInfo) ProtoReflect() protoreflect.Message

func (*ClientInfo) Reset

func (x *ClientInfo) Reset()

func (*ClientInfo) String

func (x *ClientInfo) String() string

type ClusterService

type ClusterService struct {
	ServiceIp string                `protobuf:"bytes,1,opt,name=service_ip,json=serviceIp,proto3" json:"service_ip,omitempty"`
	Hostname  string                `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Ports     []*ClusterServicePort `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"`
	// This information is only available for sandboxed services, being empty in
	// any other case
	SandboxInfo *SandboxedClusterService `protobuf:"bytes,4,opt,name=sandbox_info,json=sandboxInfo,proto3" json:"sandbox_info,omitempty"`
	// contains filtered or unexported fields
}

ClusterService provides information about a kubernetes service

func (*ClusterService) Descriptor deprecated

func (*ClusterService) Descriptor() ([]byte, []int)

Deprecated: Use ClusterService.ProtoReflect.Descriptor instead.

func (*ClusterService) GetHostname

func (x *ClusterService) GetHostname() string

func (*ClusterService) GetPorts

func (x *ClusterService) GetPorts() []*ClusterServicePort

func (*ClusterService) GetSandboxInfo

func (x *ClusterService) GetSandboxInfo() *SandboxedClusterService

func (*ClusterService) GetServiceIp

func (x *ClusterService) GetServiceIp() string

func (*ClusterService) ProtoMessage

func (*ClusterService) ProtoMessage()

func (*ClusterService) ProtoReflect

func (x *ClusterService) ProtoReflect() protoreflect.Message

func (*ClusterService) Reset

func (x *ClusterService) Reset()

func (*ClusterService) String

func (x *ClusterService) String() string

type ClusterServicePort

type ClusterServicePort struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Port        uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Protocol    string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
	AppProtocol string `protobuf:"bytes,4,opt,name=app_protocol,json=appProtocol,proto3" json:"app_protocol,omitempty"`
	// contains filtered or unexported fields
}

ClusterServicePort provides information about a service port

func (*ClusterServicePort) Descriptor deprecated

func (*ClusterServicePort) Descriptor() ([]byte, []int)

Deprecated: Use ClusterServicePort.ProtoReflect.Descriptor instead.

func (*ClusterServicePort) GetAppProtocol

func (x *ClusterServicePort) GetAppProtocol() string

func (*ClusterServicePort) GetName

func (x *ClusterServicePort) GetName() string

func (*ClusterServicePort) GetPort

func (x *ClusterServicePort) GetPort() uint32

func (*ClusterServicePort) GetProtocol

func (x *ClusterServicePort) GetProtocol() string

func (*ClusterServicePort) ProtoMessage

func (*ClusterServicePort) ProtoMessage()

func (*ClusterServicePort) ProtoReflect

func (x *ClusterServicePort) ProtoReflect() protoreflect.Message

func (*ClusterServicePort) Reset

func (x *ClusterServicePort) Reset()

func (*ClusterServicePort) String

func (x *ClusterServicePort) String() string

type DestinationSandbox

type DestinationSandbox struct {

	// Sandbox name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

A DestinationSandbox represents a sandbox that will receive traffic intended for a baseline workload in the presence of a routing key.

func (*DestinationSandbox) Descriptor deprecated

func (*DestinationSandbox) Descriptor() ([]byte, []int)

Deprecated: Use DestinationSandbox.ProtoReflect.Descriptor instead.

func (*DestinationSandbox) GetName

func (x *DestinationSandbox) GetName() string

func (*DestinationSandbox) ProtoMessage

func (*DestinationSandbox) ProtoMessage()

func (*DestinationSandbox) ProtoReflect

func (x *DestinationSandbox) ProtoReflect() protoreflect.Message

func (*DestinationSandbox) Reset

func (x *DestinationSandbox) Reset()

func (*DestinationSandbox) String

func (x *DestinationSandbox) String() string

type GetClusterServicesRequest

type GetClusterServicesRequest struct {
	// contains filtered or unexported fields
}

func (*GetClusterServicesRequest) Descriptor deprecated

func (*GetClusterServicesRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetClusterServicesRequest.ProtoReflect.Descriptor instead.

func (*GetClusterServicesRequest) ProtoMessage

func (*GetClusterServicesRequest) ProtoMessage()

func (*GetClusterServicesRequest) ProtoReflect

func (*GetClusterServicesRequest) Reset

func (x *GetClusterServicesRequest) Reset()

func (*GetClusterServicesRequest) String

func (x *GetClusterServicesRequest) String() string

type GetClusterServicesResponse

type GetClusterServicesResponse struct {
	Services []*ClusterService `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	// contains filtered or unexported fields
}

func (*GetClusterServicesResponse) Descriptor deprecated

func (*GetClusterServicesResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetClusterServicesResponse.ProtoReflect.Descriptor instead.

func (*GetClusterServicesResponse) GetServices

func (x *GetClusterServicesResponse) GetServices() []*ClusterService

func (*GetClusterServicesResponse) ProtoMessage

func (*GetClusterServicesResponse) ProtoMessage()

func (*GetClusterServicesResponse) ProtoReflect

func (*GetClusterServicesResponse) Reset

func (x *GetClusterServicesResponse) Reset()

func (*GetClusterServicesResponse) String

func (x *GetClusterServicesResponse) String() string

type GetWorkloadRoutingRulesResponse

type GetWorkloadRoutingRulesResponse struct {
	RoutingRules []*WorkloadRoutingRule `protobuf:"bytes,1,rep,name=routingRules,proto3" json:"routingRules,omitempty"`
	// contains filtered or unexported fields
}

a GetWorkloadRoutingRulesResponse gives the set of WorkloadRoutingRules which match a given WorkloadRoutingRulesRequest.

func (*GetWorkloadRoutingRulesResponse) Descriptor deprecated

func (*GetWorkloadRoutingRulesResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetWorkloadRoutingRulesResponse.ProtoReflect.Descriptor instead.

func (*GetWorkloadRoutingRulesResponse) GetRoutingRules

func (x *GetWorkloadRoutingRulesResponse) GetRoutingRules() []*WorkloadRoutingRule

func (*GetWorkloadRoutingRulesResponse) ProtoMessage

func (*GetWorkloadRoutingRulesResponse) ProtoMessage()

func (*GetWorkloadRoutingRulesResponse) ProtoReflect

func (*GetWorkloadRoutingRulesResponse) Reset

func (*GetWorkloadRoutingRulesResponse) String

type Location

type Location struct {
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

Location gives a TCP address as a host, port pair.

func (*Location) Descriptor deprecated

func (*Location) Descriptor() ([]byte, []int)

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetHost

func (x *Location) GetHost() string

func (*Location) GetPort

func (x *Location) GetPort() uint32

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

func (x *Location) ProtoReflect() protoreflect.Message

func (*Location) Reset

func (x *Location) Reset()

func (*Location) String

func (x *Location) String() string

type RoutesClient

type RoutesClient interface {
	// GetWorkloadRoutingRules returns a set of WorkloadRoutingRules, keyed by
	// baseline workload and routing key, each of which contains a
	// destinationSandbox and mappings for each port.  Each request query
	// parameter represents a different filter on the set of returned routing
	// rules.
	//
	// In the response, for each returned `WorkloadRoutingRule`, the
	// `destinationSandbox` represents the override destination to which traffic
	// will be routed in the presence of the associated routing key
	// (https://www.signadot.com/docs/context-propagation). Message queue
	// consumers may use this field to discover if a message is intended for
	// their consumption.
	//
	// `mappings` provide the association between baseline workload ports and
	// corresponding TCP addresses belonging to the `destinationSandbox`. The
	// `mappings` are used by the DevMesh sidecar
	// (https://www.signadot.com/docs/request-routing/devmesh) to implement
	// "Destination Routing", and may not be relevant to clients unless they are
	// implementing request routing in the application layer.
	GetWorkloadRoutingRules(ctx context.Context, in *WorkloadRoutingRulesRequest, opts ...grpc.CallOption) (*GetWorkloadRoutingRulesResponse, error)
	// WatchWorkloadRoutingRules is a reactive version of GetWorkloadRoutingRules
	// that provides a stream of modifications to the set of WorkloadRoutingRules
	// (keyed by the pair baseline, routingKey), in near real-time.
	WatchWorkloadRoutingRules(ctx context.Context, in *WorkloadRoutingRulesRequest, opts ...grpc.CallOption) (Routes_WatchWorkloadRoutingRulesClient, error)
	// Returns a list of in-cluster services including headless addressable hosts,
	// providing information about their IP, hostname, and exposed ports
	GetClusterServices(ctx context.Context, in *GetClusterServicesRequest, opts ...grpc.CallOption) (*GetClusterServicesResponse, error)
}

RoutesClient is the client API for Routes service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewRoutesClient

func NewRoutesClient(cc grpc.ClientConnInterface) RoutesClient

type RoutesServer

type RoutesServer interface {
	// GetWorkloadRoutingRules returns a set of WorkloadRoutingRules, keyed by
	// baseline workload and routing key, each of which contains a
	// destinationSandbox and mappings for each port.  Each request query
	// parameter represents a different filter on the set of returned routing
	// rules.
	//
	// In the response, for each returned `WorkloadRoutingRule`, the
	// `destinationSandbox` represents the override destination to which traffic
	// will be routed in the presence of the associated routing key
	// (https://www.signadot.com/docs/context-propagation). Message queue
	// consumers may use this field to discover if a message is intended for
	// their consumption.
	//
	// `mappings` provide the association between baseline workload ports and
	// corresponding TCP addresses belonging to the `destinationSandbox`. The
	// `mappings` are used by the DevMesh sidecar
	// (https://www.signadot.com/docs/request-routing/devmesh) to implement
	// "Destination Routing", and may not be relevant to clients unless they are
	// implementing request routing in the application layer.
	GetWorkloadRoutingRules(context.Context, *WorkloadRoutingRulesRequest) (*GetWorkloadRoutingRulesResponse, error)
	// WatchWorkloadRoutingRules is a reactive version of GetWorkloadRoutingRules
	// that provides a stream of modifications to the set of WorkloadRoutingRules
	// (keyed by the pair baseline, routingKey), in near real-time.
	WatchWorkloadRoutingRules(*WorkloadRoutingRulesRequest, Routes_WatchWorkloadRoutingRulesServer) error
	// Returns a list of in-cluster services including headless addressable hosts,
	// providing information about their IP, hostname, and exposed ports
	GetClusterServices(context.Context, *GetClusterServicesRequest) (*GetClusterServicesResponse, error)
	// contains filtered or unexported methods
}

RoutesServer is the server API for Routes service. All implementations must embed UnimplementedRoutesServer for forward compatibility

type Routes_WatchWorkloadRoutingRulesClient

type Routes_WatchWorkloadRoutingRulesClient interface {
	Recv() (*WorkloadRoutingRuleOp, error)
	grpc.ClientStream
}

type Routes_WatchWorkloadRoutingRulesServer

type Routes_WatchWorkloadRoutingRulesServer interface {
	Send(*WorkloadRoutingRuleOp) error
	grpc.ServerStream
}

type SandboxedClusterService

type SandboxedClusterService struct {

	// Routing key of the sandbox who created the service
	SandboxRoutingKey string `protobuf:"bytes,1,opt,name=sandbox_routing_key,json=sandboxRoutingKey,proto3" json:"sandbox_routing_key,omitempty"`
	// Hostname of the baseline service
	BaselineHostname string `protobuf:"bytes,2,opt,name=baseline_hostname,json=baselineHostname,proto3" json:"baseline_hostname,omitempty"`
	// contains filtered or unexported fields
}

func (*SandboxedClusterService) Descriptor deprecated

func (*SandboxedClusterService) Descriptor() ([]byte, []int)

Deprecated: Use SandboxedClusterService.ProtoReflect.Descriptor instead.

func (*SandboxedClusterService) GetBaselineHostname

func (x *SandboxedClusterService) GetBaselineHostname() string

func (*SandboxedClusterService) GetSandboxRoutingKey

func (x *SandboxedClusterService) GetSandboxRoutingKey() string

func (*SandboxedClusterService) ProtoMessage

func (*SandboxedClusterService) ProtoMessage()

func (*SandboxedClusterService) ProtoReflect

func (x *SandboxedClusterService) ProtoReflect() protoreflect.Message

func (*SandboxedClusterService) Reset

func (x *SandboxedClusterService) Reset()

func (*SandboxedClusterService) String

func (x *SandboxedClusterService) String() string

type TrafficManager

type TrafficManager struct {

	// next specifies the sd-traffic-next-host header content as a Location.
	// it is like destinations.
	NextDestinations []*Location `protobuf:"bytes,1,rep,name=next_destinations,json=nextDestinations,proto3" json:"next_destinations,omitempty"`
	// all_traffic, if specified and true, indicates that any traffic goes to the TM.
	// otherwise, only traffic with sd-traffic header goes to TM.
	AllTraffic bool `protobuf:"varint,2,opt,name=all_traffic,json=allTraffic,proto3" json:"all_traffic,omitempty"`
	// contains filtered or unexported fields
}

func (*TrafficManager) Descriptor deprecated

func (*TrafficManager) Descriptor() ([]byte, []int)

Deprecated: Use TrafficManager.ProtoReflect.Descriptor instead.

func (*TrafficManager) GetAllTraffic

func (x *TrafficManager) GetAllTraffic() bool

func (*TrafficManager) GetNextDestinations

func (x *TrafficManager) GetNextDestinations() []*Location

func (*TrafficManager) ProtoMessage

func (*TrafficManager) ProtoMessage()

func (*TrafficManager) ProtoReflect

func (x *TrafficManager) ProtoReflect() protoreflect.Message

func (*TrafficManager) Reset

func (x *TrafficManager) Reset()

func (*TrafficManager) String

func (x *TrafficManager) String() string

type UnimplementedRoutesServer

type UnimplementedRoutesServer struct {
}

UnimplementedRoutesServer must be embedded to have forward compatible implementations.

type UnsafeRoutesServer

type UnsafeRoutesServer interface {
	// contains filtered or unexported methods
}

UnsafeRoutesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RoutesServer will result in compilation errors.

type WatchOp

type WatchOp int32

A WatchOp indicates what operation is to be performed on the set of WorkloadRoutingRules specified in a WorkloadRoutingRulesRequest.

const (
	WatchOp_ADD     WatchOp = 0
	WatchOp_REMOVE  WatchOp = 1
	WatchOp_REPLACE WatchOp = 2
	// In any WatchWorkloadRoutingRules rpc call, the returned stream will send at most
	// 1 SYNCED WatchOp, indicating the client has all the information about
	// Sandboxes and RouteGroups available in the cluster. Prior to sending a
	// SYNCED WatchOp, all WatchOps are ADDs.
	WatchOp_SYNCED WatchOp = 3
)

func (WatchOp) Descriptor

func (WatchOp) Descriptor() protoreflect.EnumDescriptor

func (WatchOp) Enum

func (x WatchOp) Enum() *WatchOp

func (WatchOp) EnumDescriptor deprecated

func (WatchOp) EnumDescriptor() ([]byte, []int)

Deprecated: Use WatchOp.Descriptor instead.

func (WatchOp) Number

func (x WatchOp) Number() protoreflect.EnumNumber

func (WatchOp) String

func (x WatchOp) String() string

func (WatchOp) Type

func (WatchOp) Type() protoreflect.EnumType

type WorkloadPortMapping

type WorkloadPortMapping struct {
	WorkloadPort uint32      `protobuf:"varint,1,opt,name=workload_port,json=workloadPort,proto3" json:"workload_port,omitempty"`
	Destinations []*Location `protobuf:"bytes,2,rep,name=destinations,proto3" json:"destinations,omitempty"`
	// TrafficManagery specification, used to specify how to interact with
	// the TM.  If absent, no traffic goes to TM.  If present, some traffic
	// may go to TM.
	TrafficManager *TrafficManager `protobuf:"bytes,3,opt,name=traffic_manager,json=trafficManager,proto3" json:"traffic_manager,omitempty"`
	// contains filtered or unexported fields
}

A WorkloadPortMapping provides a mapping from a port on the workload to a set of destinations. Each destination in the response corresponds to a sandbox service matching the sandboxed workload. As a result, any of the destinations can be used.

func (*WorkloadPortMapping) Descriptor deprecated

func (*WorkloadPortMapping) Descriptor() ([]byte, []int)

Deprecated: Use WorkloadPortMapping.ProtoReflect.Descriptor instead.

func (*WorkloadPortMapping) GetDestinations

func (x *WorkloadPortMapping) GetDestinations() []*Location

func (*WorkloadPortMapping) GetTrafficManager

func (x *WorkloadPortMapping) GetTrafficManager() *TrafficManager

func (*WorkloadPortMapping) GetWorkloadPort

func (x *WorkloadPortMapping) GetWorkloadPort() uint32

func (*WorkloadPortMapping) ProtoMessage

func (*WorkloadPortMapping) ProtoMessage()

func (*WorkloadPortMapping) ProtoReflect

func (x *WorkloadPortMapping) ProtoReflect() protoreflect.Message

func (*WorkloadPortMapping) Reset

func (x *WorkloadPortMapping) Reset()

func (*WorkloadPortMapping) String

func (x *WorkloadPortMapping) String() string

type WorkloadRoutingRule

type WorkloadRoutingRule struct {
	RoutingKey string `protobuf:"bytes,1,opt,name=routing_key,json=routingKey,proto3" json:"routing_key,omitempty"`
	// baseline indicates the corresponding baseline workload.
	Baseline *BaselineWorkload `protobuf:"bytes,2,opt,name=baseline,proto3" json:"baseline,omitempty"`
	// destination_sandbox indicates the sandbox associated with the destination
	// sandboxed workloads.
	DestinationSandbox *DestinationSandbox `protobuf:"bytes,3,opt,name=destination_sandbox,json=destinationSandbox,proto3" json:"destination_sandbox,omitempty"`
	// mappings represents a mapping from a port on the workload to a set of
	// destinations.
	Mappings []*WorkloadPortMapping `protobuf:"bytes,4,rep,name=mappings,proto3" json:"mappings,omitempty"`
	// contains filtered or unexported fields
}

A WorkloadRoutingRule defines for a given baseline and a routing key, a single `destinationSandbox` and `mappings`. The mappings map each port of the baseline workload with corresponding TCP addresses belonging to the `destinationSandbox` where traffic is routed instead.

func (*WorkloadRoutingRule) Descriptor deprecated

func (*WorkloadRoutingRule) Descriptor() ([]byte, []int)

Deprecated: Use WorkloadRoutingRule.ProtoReflect.Descriptor instead.

func (*WorkloadRoutingRule) GetBaseline

func (x *WorkloadRoutingRule) GetBaseline() *BaselineWorkload

func (*WorkloadRoutingRule) GetDestinationSandbox

func (x *WorkloadRoutingRule) GetDestinationSandbox() *DestinationSandbox

func (*WorkloadRoutingRule) GetMappings

func (x *WorkloadRoutingRule) GetMappings() []*WorkloadPortMapping

func (*WorkloadRoutingRule) GetRoutingKey

func (x *WorkloadRoutingRule) GetRoutingKey() string

func (*WorkloadRoutingRule) ProtoMessage

func (*WorkloadRoutingRule) ProtoMessage()

func (*WorkloadRoutingRule) ProtoReflect

func (x *WorkloadRoutingRule) ProtoReflect() protoreflect.Message

func (*WorkloadRoutingRule) Reset

func (x *WorkloadRoutingRule) Reset()

func (*WorkloadRoutingRule) String

func (x *WorkloadRoutingRule) String() string

type WorkloadRoutingRuleOp

type WorkloadRoutingRuleOp struct {
	Op    WatchOp              `protobuf:"varint,1,opt,name=op,proto3,enum=routes.WatchOp" json:"op,omitempty"`
	Route *WorkloadRoutingRule `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

WorkloadRouteOp describes a diff operation against a set of workload routes: adding, removing, and replacing WorkloadRoutes are possible. Additionally, there is a SYNCED operation to indicate when the client has received all relevant WorkloadRoutes.

func (*WorkloadRoutingRuleOp) Descriptor deprecated

func (*WorkloadRoutingRuleOp) Descriptor() ([]byte, []int)

Deprecated: Use WorkloadRoutingRuleOp.ProtoReflect.Descriptor instead.

func (*WorkloadRoutingRuleOp) GetOp

func (x *WorkloadRoutingRuleOp) GetOp() WatchOp

func (*WorkloadRoutingRuleOp) GetRoute

func (*WorkloadRoutingRuleOp) ProtoMessage

func (*WorkloadRoutingRuleOp) ProtoMessage()

func (*WorkloadRoutingRuleOp) ProtoReflect

func (x *WorkloadRoutingRuleOp) ProtoReflect() protoreflect.Message

func (*WorkloadRoutingRuleOp) Reset

func (x *WorkloadRoutingRuleOp) Reset()

func (*WorkloadRoutingRuleOp) String

func (x *WorkloadRoutingRuleOp) String() string

type WorkloadRoutingRulesRequest

type WorkloadRoutingRulesRequest struct {

	// baseline_workload specifies the kind, namespace, and name of the baseline
	// workload to which requests are directed. Each field is optional.
	BaselineWorkload *BaselineWorkload `protobuf:"bytes,1,opt,name=baseline_workload,json=baselineWorkload,proto3" json:"baseline_workload,omitempty"`
	// routing_key specifies the routing key associated with the request.
	RoutingKey string `protobuf:"bytes,2,opt,name=routing_key,json=routingKey,proto3" json:"routing_key,omitempty"`
	// destination_sandbox specifies the sandbox associated with the destination
	// sandboxed workloads.
	DestinationSandbox *DestinationSandbox `protobuf:"bytes,3,opt,name=destination_sandbox,json=destinationSandbox,proto3" json:"destination_sandbox,omitempty"`
	// client_info indicates what capabilities the client has.  If absent,
	// the minimum capabilities are assumed.
	ClientInfo *ClientInfo `protobuf:"bytes,4,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
	// contains filtered or unexported fields
}

WorkloadRoutingRulesRequest is a request for a set of WorkloadRoutingRules, which give information about how to route requests when they are intercepted at a given workload. Each field is optional and constrains the the set of WorkloadRoutingRules returned accordingly.

func (*WorkloadRoutingRulesRequest) Descriptor deprecated

func (*WorkloadRoutingRulesRequest) Descriptor() ([]byte, []int)

Deprecated: Use WorkloadRoutingRulesRequest.ProtoReflect.Descriptor instead.

func (*WorkloadRoutingRulesRequest) GetBaselineWorkload

func (x *WorkloadRoutingRulesRequest) GetBaselineWorkload() *BaselineWorkload

func (*WorkloadRoutingRulesRequest) GetClientInfo

func (x *WorkloadRoutingRulesRequest) GetClientInfo() *ClientInfo

func (*WorkloadRoutingRulesRequest) GetDestinationSandbox

func (x *WorkloadRoutingRulesRequest) GetDestinationSandbox() *DestinationSandbox

func (*WorkloadRoutingRulesRequest) GetRoutingKey

func (x *WorkloadRoutingRulesRequest) GetRoutingKey() string

func (*WorkloadRoutingRulesRequest) ProtoMessage

func (*WorkloadRoutingRulesRequest) ProtoMessage()

func (*WorkloadRoutingRulesRequest) ProtoReflect

func (*WorkloadRoutingRulesRequest) Reset

func (x *WorkloadRoutingRulesRequest) Reset()

func (*WorkloadRoutingRulesRequest) String

func (x *WorkloadRoutingRulesRequest) String() string

Directories

Path Synopsis
cmd
internal
package watched provides read access to workload routes backed by a retrying client
package watched provides read access to workload routes backed by a retrying client

Jump to

Keyboard shortcuts

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