Documentation ¶
Index ¶
- Constants
- Variables
- func GetGatewayIP(gw *gatewayv1beta1.Gateway) (ip net.IP, err error)
- func GetGatewayPort(gw *gatewayv1beta1.Gateway, refs []gatewayv1alpha2.ParentReference) (uint32, error)
- func RegisterBackendsServer(s grpc.ServiceRegistrar, srv BackendsServer)
- type BackendsClient
- type BackendsClientManager
- func (c *BackendsClientManager) Close()
- func (c *BackendsClientManager) Delete(ctx context.Context, in *Vip, opts ...grpc.CallOption) (*Confirmation, error)
- func (c *BackendsClientManager) SetClientsList(ctx context.Context, readyPods map[types.NamespacedName]corev1.Pod) (bool, error)
- func (c *BackendsClientManager) Update(ctx context.Context, in *Targets, opts ...grpc.CallOption) (*Confirmation, error)
- type BackendsServer
- type Confirmation
- type InterfaceIndexConfirmation
- func (*InterfaceIndexConfirmation) Descriptor() ([]byte, []int)deprecated
- func (x *InterfaceIndexConfirmation) GetIfindex() uint32
- func (*InterfaceIndexConfirmation) ProtoMessage()
- func (x *InterfaceIndexConfirmation) ProtoReflect() protoreflect.Message
- func (x *InterfaceIndexConfirmation) Reset()
- func (x *InterfaceIndexConfirmation) String() string
- type PodIP
- type Target
- func (*Target) Descriptor() ([]byte, []int)deprecated
- func (x *Target) GetDaddr() uint32
- func (x *Target) GetDport() uint32
- func (x *Target) GetIfindex() uint32
- func (*Target) ProtoMessage()
- func (x *Target) ProtoReflect() protoreflect.Message
- func (x *Target) Reset()
- func (x *Target) String() string
- type Targets
- type UnimplementedBackendsServer
- type UnsafeBackendsServer
- type Vip
Constants ¶
const ( Backends_GetInterfaceIndex_FullMethodName = "/backends.backends/GetInterfaceIndex" Backends_Update_FullMethodName = "/backends.backends/Update" Backends_Delete_FullMethodName = "/backends.backends/Delete" )
Variables ¶
var Backends_ServiceDesc = grpc.ServiceDesc{ ServiceName: "backends.backends", HandlerType: (*BackendsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetInterfaceIndex", Handler: _Backends_GetInterfaceIndex_Handler, }, { MethodName: "Update", Handler: _Backends_Update_Handler, }, { MethodName: "Delete", Handler: _Backends_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "dataplane/api-server/proto/backends.proto", }
Backends_ServiceDesc is the grpc.ServiceDesc for Backends service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_dataplane_api_server_proto_backends_proto protoreflect.FileDescriptor
Functions ¶
func GetGatewayIP ¶
func GetGatewayIP(gw *gatewayv1beta1.Gateway) (ip net.IP, err error)
func GetGatewayPort ¶
func GetGatewayPort(gw *gatewayv1beta1.Gateway, refs []gatewayv1alpha2.ParentReference) (uint32, error)
func RegisterBackendsServer ¶
func RegisterBackendsServer(s grpc.ServiceRegistrar, srv BackendsServer)
Types ¶
type BackendsClient ¶
type BackendsClient interface { GetInterfaceIndex(ctx context.Context, in *PodIP, opts ...grpc.CallOption) (*InterfaceIndexConfirmation, error) Update(ctx context.Context, in *Targets, opts ...grpc.CallOption) (*Confirmation, error) Delete(ctx context.Context, in *Vip, opts ...grpc.CallOption) (*Confirmation, error) }
BackendsClient is the client API for Backends 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 NewBackendsClient ¶
func NewBackendsClient(cc grpc.ClientConnInterface) BackendsClient
type BackendsClientManager ¶
type BackendsClientManager struct {
// contains filtered or unexported fields
}
BackendsClientManager is managing the connections and interactions with the available BackendsClient servers.
func NewBackendsClientManager ¶
func NewBackendsClientManager(config *rest.Config) (*BackendsClientManager, error)
NewBackendsClientManager returns an initialized instance of BackendsClientManager.
func (*BackendsClientManager) Close ¶
func (c *BackendsClientManager) Close()
func (*BackendsClientManager) Delete ¶
func (c *BackendsClientManager) Delete(ctx context.Context, in *Vip, opts ...grpc.CallOption) (*Confirmation, error)
Delete sends an delete request to all available BackendsClient servers concurrently.
func (*BackendsClientManager) SetClientsList ¶
func (c *BackendsClientManager) SetClientsList(ctx context.Context, readyPods map[types.NamespacedName]corev1.Pod) (bool, error)
func (*BackendsClientManager) Update ¶
func (c *BackendsClientManager) Update(ctx context.Context, in *Targets, opts ...grpc.CallOption) (*Confirmation, error)
Update sends an update request to all available BackendsClient servers concurrently.
type BackendsServer ¶
type BackendsServer interface { GetInterfaceIndex(context.Context, *PodIP) (*InterfaceIndexConfirmation, error) Update(context.Context, *Targets) (*Confirmation, error) Delete(context.Context, *Vip) (*Confirmation, error) // contains filtered or unexported methods }
BackendsServer is the server API for Backends service. All implementations must embed UnimplementedBackendsServer for forward compatibility
type Confirmation ¶
type Confirmation struct { Confirmation string `protobuf:"bytes,1,opt,name=confirmation,proto3" json:"confirmation,omitempty"` // contains filtered or unexported fields }
func (*Confirmation) Descriptor
deprecated
func (*Confirmation) Descriptor() ([]byte, []int)
Deprecated: Use Confirmation.ProtoReflect.Descriptor instead.
func (*Confirmation) GetConfirmation ¶
func (x *Confirmation) GetConfirmation() string
func (*Confirmation) ProtoMessage ¶
func (*Confirmation) ProtoMessage()
func (*Confirmation) ProtoReflect ¶
func (x *Confirmation) ProtoReflect() protoreflect.Message
func (*Confirmation) Reset ¶
func (x *Confirmation) Reset()
func (*Confirmation) String ¶
func (x *Confirmation) String() string
type InterfaceIndexConfirmation ¶
type InterfaceIndexConfirmation struct { Ifindex uint32 `protobuf:"varint,1,opt,name=ifindex,proto3" json:"ifindex,omitempty"` // contains filtered or unexported fields }
func (*InterfaceIndexConfirmation) Descriptor
deprecated
func (*InterfaceIndexConfirmation) Descriptor() ([]byte, []int)
Deprecated: Use InterfaceIndexConfirmation.ProtoReflect.Descriptor instead.
func (*InterfaceIndexConfirmation) GetIfindex ¶
func (x *InterfaceIndexConfirmation) GetIfindex() uint32
func (*InterfaceIndexConfirmation) ProtoMessage ¶
func (*InterfaceIndexConfirmation) ProtoMessage()
func (*InterfaceIndexConfirmation) ProtoReflect ¶
func (x *InterfaceIndexConfirmation) ProtoReflect() protoreflect.Message
func (*InterfaceIndexConfirmation) Reset ¶
func (x *InterfaceIndexConfirmation) Reset()
func (*InterfaceIndexConfirmation) String ¶
func (x *InterfaceIndexConfirmation) String() string
type PodIP ¶
type PodIP struct { Ip uint32 `protobuf:"varint,1,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
func (*PodIP) Descriptor
deprecated
func (*PodIP) ProtoMessage ¶
func (*PodIP) ProtoMessage()
func (*PodIP) ProtoReflect ¶
func (x *PodIP) ProtoReflect() protoreflect.Message
type Target ¶
type Target struct { Daddr uint32 `protobuf:"varint,1,opt,name=daddr,proto3" json:"daddr,omitempty"` Dport uint32 `protobuf:"varint,2,opt,name=dport,proto3" json:"dport,omitempty"` Ifindex *uint32 `protobuf:"varint,3,opt,name=ifindex,proto3,oneof" json:"ifindex,omitempty"` // contains filtered or unexported fields }
func (*Target) Descriptor
deprecated
func (*Target) GetIfindex ¶
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) ProtoReflect ¶
func (x *Target) ProtoReflect() protoreflect.Message
type Targets ¶
type Targets struct { Vip *Vip `protobuf:"bytes,1,opt,name=vip,proto3" json:"vip,omitempty"` Targets []*Target `protobuf:"bytes,2,rep,name=targets,proto3" json:"targets,omitempty"` // contains filtered or unexported fields }
func CompileTCPRouteToDataPlaneBackend ¶
func CompileTCPRouteToDataPlaneBackend(ctx context.Context, c client.Client, tcproute *gatewayv1alpha2.TCPRoute, gateway *gatewayv1beta1.Gateway) (*Targets, error)
CompileTCPRouteToDataPlaneBackend takes a TCPRoute and the Gateway it is attached to and produces Backend Targets for the DataPlane to configure.
func CompileUDPRouteToDataPlaneBackend ¶
func CompileUDPRouteToDataPlaneBackend(ctx context.Context, c client.Client, udproute *gatewayv1alpha2.UDPRoute, gateway *gatewayv1beta1.Gateway) (*Targets, error)
CompileUDPRouteToDataPlaneBackend takes a UDPRoute and the Gateway it is attached to and produces Backend Targets for the DataPlane to configure.
func (*Targets) Descriptor
deprecated
func (*Targets) GetTargets ¶
func (*Targets) ProtoMessage ¶
func (*Targets) ProtoMessage()
func (*Targets) ProtoReflect ¶
func (x *Targets) ProtoReflect() protoreflect.Message
type UnimplementedBackendsServer ¶
type UnimplementedBackendsServer struct { }
UnimplementedBackendsServer must be embedded to have forward compatible implementations.
func (UnimplementedBackendsServer) Delete ¶
func (UnimplementedBackendsServer) Delete(context.Context, *Vip) (*Confirmation, error)
func (UnimplementedBackendsServer) GetInterfaceIndex ¶
func (UnimplementedBackendsServer) GetInterfaceIndex(context.Context, *PodIP) (*InterfaceIndexConfirmation, error)
func (UnimplementedBackendsServer) Update ¶
func (UnimplementedBackendsServer) Update(context.Context, *Targets) (*Confirmation, error)
type UnsafeBackendsServer ¶
type UnsafeBackendsServer interface {
// contains filtered or unexported methods
}
UnsafeBackendsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BackendsServer will result in compilation errors.
type Vip ¶
type Vip struct { Ip uint32 `protobuf:"varint,1,opt,name=ip,proto3" json:"ip,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // contains filtered or unexported fields }
func (*Vip) Descriptor
deprecated
func (*Vip) ProtoMessage ¶
func (*Vip) ProtoMessage()
func (*Vip) ProtoReflect ¶
func (x *Vip) ProtoReflect() protoreflect.Message