client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Backends_GetInterfaceIndex_FullMethodName = "/backends.backends/GetInterfaceIndex"
	Backends_Update_FullMethodName            = "/backends.backends/Update"
	Backends_Delete_FullMethodName            = "/backends.backends/Delete"
)

Variables

View Source
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)

View Source
var File_dataplane_api_server_proto_backends_proto protoreflect.FileDescriptor

Functions

func GetGatewayIP

func GetGatewayIP(gw *gatewayv1beta1.Gateway) (ip net.IP, err 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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use PodIP.ProtoReflect.Descriptor instead.

func (*PodIP) GetIp

func (x *PodIP) GetIp() uint32

func (*PodIP) ProtoMessage

func (*PodIP) ProtoMessage()

func (*PodIP) ProtoReflect

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

func (*PodIP) Reset

func (x *PodIP) Reset()

func (*PodIP) String

func (x *PodIP) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Target.ProtoReflect.Descriptor instead.

func (*Target) GetDaddr

func (x *Target) GetDaddr() uint32

func (*Target) GetDport

func (x *Target) GetDport() uint32

func (*Target) GetIfindex

func (x *Target) GetIfindex() uint32

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) ProtoReflect

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

func (*Target) Reset

func (x *Target) Reset()

func (*Target) String

func (x *Target) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Targets.ProtoReflect.Descriptor instead.

func (*Targets) GetTargets

func (x *Targets) GetTargets() []*Target

func (*Targets) GetVip

func (x *Targets) GetVip() *Vip

func (*Targets) ProtoMessage

func (*Targets) ProtoMessage()

func (*Targets) ProtoReflect

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

func (*Targets) Reset

func (x *Targets) Reset()

func (*Targets) String

func (x *Targets) String() string

type UnimplementedBackendsServer

type UnimplementedBackendsServer struct {
}

UnimplementedBackendsServer must be embedded to have forward compatible implementations.

func (UnimplementedBackendsServer) Delete

func (UnimplementedBackendsServer) GetInterfaceIndex

func (UnimplementedBackendsServer) Update

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) Descriptor() ([]byte, []int)

Deprecated: Use Vip.ProtoReflect.Descriptor instead.

func (*Vip) GetIp

func (x *Vip) GetIp() uint32

func (*Vip) GetPort

func (x *Vip) GetPort() uint32

func (*Vip) ProtoMessage

func (*Vip) ProtoMessage()

func (*Vip) ProtoReflect

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

func (*Vip) Reset

func (x *Vip) Reset()

func (*Vip) String

func (x *Vip) String() string

Jump to

Keyboard shortcuts

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