rpc

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 76

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterCNIBackendServer

func RegisterCNIBackendServer(s *grpc.Server, srv CNIBackendServer)

func RegisterNPBackendServer added in v1.17.1

func RegisterNPBackendServer(s *grpc.Server, srv NPBackendServer)

Types

type AddNetworkReply

type AddNetworkReply struct {
	Success         bool     `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	IPv4Addr        string   `protobuf:"bytes,2,opt,name=IPv4Addr,proto3" json:"IPv4Addr,omitempty"`
	IPv6Addr        string   `protobuf:"bytes,11,opt,name=IPv6Addr,proto3" json:"IPv6Addr,omitempty"`
	DeviceNumber    int32    `protobuf:"varint,4,opt,name=DeviceNumber,proto3" json:"DeviceNumber,omitempty"`
	UseExternalSNAT bool     `protobuf:"varint,5,opt,name=UseExternalSNAT,proto3" json:"UseExternalSNAT,omitempty"`
	VPCv4CIDRs      []string `protobuf:"bytes,6,rep,name=VPCv4CIDRs,proto3" json:"VPCv4CIDRs,omitempty"`
	VPCv6CIDRs      []string `protobuf:"bytes,12,rep,name=VPCv6CIDRs,proto3" json:"VPCv6CIDRs,omitempty"`
	// start of pod-eni parameters
	PodVlanId         int32  `protobuf:"varint,7,opt,name=PodVlanId,proto3" json:"PodVlanId,omitempty"`
	PodENIMAC         string `protobuf:"bytes,8,opt,name=PodENIMAC,proto3" json:"PodENIMAC,omitempty"`
	PodENISubnetGW    string `protobuf:"bytes,9,opt,name=PodENISubnetGW,proto3" json:"PodENISubnetGW,omitempty"`
	ParentIfIndex     int32  `protobuf:"varint,10,opt,name=ParentIfIndex,proto3" json:"ParentIfIndex,omitempty"`        // end of pod-eni parameters
	NetworkPolicyMode string `protobuf:"bytes,13,opt,name=NetworkPolicyMode,proto3" json:"NetworkPolicyMode,omitempty"` // next field: 14
	// contains filtered or unexported fields
}

func (*AddNetworkReply) Descriptor deprecated

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

Deprecated: Use AddNetworkReply.ProtoReflect.Descriptor instead.

func (*AddNetworkReply) GetDeviceNumber

func (x *AddNetworkReply) GetDeviceNumber() int32

func (*AddNetworkReply) GetIPv4Addr

func (x *AddNetworkReply) GetIPv4Addr() string

func (*AddNetworkReply) GetIPv6Addr added in v1.10.0

func (x *AddNetworkReply) GetIPv6Addr() string

func (*AddNetworkReply) GetNetworkPolicyMode added in v1.17.1

func (x *AddNetworkReply) GetNetworkPolicyMode() string

func (*AddNetworkReply) GetParentIfIndex added in v1.6.4

func (x *AddNetworkReply) GetParentIfIndex() int32

func (*AddNetworkReply) GetPodENIMAC added in v1.6.4

func (x *AddNetworkReply) GetPodENIMAC() string

func (*AddNetworkReply) GetPodENISubnetGW added in v1.6.4

func (x *AddNetworkReply) GetPodENISubnetGW() string

func (*AddNetworkReply) GetPodVlanId added in v1.6.4

func (x *AddNetworkReply) GetPodVlanId() int32

func (*AddNetworkReply) GetSuccess

func (x *AddNetworkReply) GetSuccess() bool

func (*AddNetworkReply) GetUseExternalSNAT added in v1.3.0

func (x *AddNetworkReply) GetUseExternalSNAT() bool

func (*AddNetworkReply) GetVPCv4CIDRs added in v1.10.0

func (x *AddNetworkReply) GetVPCv4CIDRs() []string

func (*AddNetworkReply) GetVPCv6CIDRs added in v1.10.0

func (x *AddNetworkReply) GetVPCv6CIDRs() []string

func (*AddNetworkReply) ProtoMessage

func (*AddNetworkReply) ProtoMessage()

func (*AddNetworkReply) ProtoReflect added in v1.10.0

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

func (*AddNetworkReply) Reset

func (x *AddNetworkReply) Reset()

func (*AddNetworkReply) String

func (x *AddNetworkReply) String() string

type AddNetworkRequest

type AddNetworkRequest struct {
	ClientVersion              string `protobuf:"bytes,8,opt,name=ClientVersion,proto3" json:"ClientVersion,omitempty"`
	K8S_POD_NAME               string `protobuf:"bytes,1,opt,name=K8S_POD_NAME,json=K8SPODNAME,proto3" json:"K8S_POD_NAME,omitempty"`
	K8S_POD_NAMESPACE          string `protobuf:"bytes,2,opt,name=K8S_POD_NAMESPACE,json=K8SPODNAMESPACE,proto3" json:"K8S_POD_NAMESPACE,omitempty"`
	K8S_POD_INFRA_CONTAINER_ID string `` /* 133-byte string literal not displayed */
	ContainerID                string `protobuf:"bytes,7,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"`
	IfName                     string `protobuf:"bytes,5,opt,name=IfName,proto3" json:"IfName,omitempty"`
	NetworkName                string `protobuf:"bytes,6,opt,name=NetworkName,proto3" json:"NetworkName,omitempty"`
	Netns                      string `protobuf:"bytes,4,opt,name=Netns,proto3" json:"Netns,omitempty"` // next field: 9
	// contains filtered or unexported fields
}

func (*AddNetworkRequest) Descriptor deprecated

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

Deprecated: Use AddNetworkRequest.ProtoReflect.Descriptor instead.

func (*AddNetworkRequest) GetClientVersion added in v1.7.0

func (x *AddNetworkRequest) GetClientVersion() string

func (*AddNetworkRequest) GetContainerID added in v1.6.4

func (x *AddNetworkRequest) GetContainerID() string

func (*AddNetworkRequest) GetIfName

func (x *AddNetworkRequest) GetIfName() string

func (*AddNetworkRequest) GetK8S_POD_INFRA_CONTAINER_ID

func (x *AddNetworkRequest) GetK8S_POD_INFRA_CONTAINER_ID() string

func (*AddNetworkRequest) GetK8S_POD_NAME

func (x *AddNetworkRequest) GetK8S_POD_NAME() string

func (*AddNetworkRequest) GetK8S_POD_NAMESPACE

func (x *AddNetworkRequest) GetK8S_POD_NAMESPACE() string

func (*AddNetworkRequest) GetNetns

func (x *AddNetworkRequest) GetNetns() string

func (*AddNetworkRequest) GetNetworkName added in v1.6.4

func (x *AddNetworkRequest) GetNetworkName() string

func (*AddNetworkRequest) ProtoMessage

func (*AddNetworkRequest) ProtoMessage()

func (*AddNetworkRequest) ProtoReflect added in v1.10.0

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

func (*AddNetworkRequest) Reset

func (x *AddNetworkRequest) Reset()

func (*AddNetworkRequest) String

func (x *AddNetworkRequest) String() string

type CNIBackendClient

type CNIBackendClient interface {
	AddNetwork(ctx context.Context, in *AddNetworkRequest, opts ...grpc.CallOption) (*AddNetworkReply, error)
	DelNetwork(ctx context.Context, in *DelNetworkRequest, opts ...grpc.CallOption) (*DelNetworkReply, error)
}

CNIBackendClient is the client API for CNIBackend service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCNIBackendClient

func NewCNIBackendClient(cc grpc.ClientConnInterface) CNIBackendClient

type CNIBackendServer

type CNIBackendServer interface {
	AddNetwork(context.Context, *AddNetworkRequest) (*AddNetworkReply, error)
	DelNetwork(context.Context, *DelNetworkRequest) (*DelNetworkReply, error)
}

CNIBackendServer is the server API for CNIBackend service.

type DelNetworkReply

type DelNetworkReply struct {
	Success      bool   `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	IPv4Addr     string `protobuf:"bytes,2,opt,name=IPv4Addr,proto3" json:"IPv4Addr,omitempty"`
	IPv6Addr     string `protobuf:"bytes,5,opt,name=IPv6Addr,proto3" json:"IPv6Addr,omitempty"`
	DeviceNumber int32  `protobuf:"varint,3,opt,name=DeviceNumber,proto3" json:"DeviceNumber,omitempty"`
	// start of pod-eni parameters
	PodVlanId int32 `protobuf:"varint,4,opt,name=PodVlanId,proto3" json:"PodVlanId,omitempty"` // end of pod-eni parameters
	// contains filtered or unexported fields
}

func (*DelNetworkReply) Descriptor deprecated

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

Deprecated: Use DelNetworkReply.ProtoReflect.Descriptor instead.

func (*DelNetworkReply) GetDeviceNumber

func (x *DelNetworkReply) GetDeviceNumber() int32

func (*DelNetworkReply) GetIPv4Addr

func (x *DelNetworkReply) GetIPv4Addr() string

func (*DelNetworkReply) GetIPv6Addr added in v1.10.0

func (x *DelNetworkReply) GetIPv6Addr() string

func (*DelNetworkReply) GetPodVlanId added in v1.6.4

func (x *DelNetworkReply) GetPodVlanId() int32

func (*DelNetworkReply) GetSuccess

func (x *DelNetworkReply) GetSuccess() bool

func (*DelNetworkReply) ProtoMessage

func (*DelNetworkReply) ProtoMessage()

func (*DelNetworkReply) ProtoReflect added in v1.10.0

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

func (*DelNetworkReply) Reset

func (x *DelNetworkReply) Reset()

func (*DelNetworkReply) String

func (x *DelNetworkReply) String() string

type DelNetworkRequest

type DelNetworkRequest struct {
	ClientVersion              string `protobuf:"bytes,9,opt,name=ClientVersion,proto3" json:"ClientVersion,omitempty"`
	K8S_POD_NAME               string `protobuf:"bytes,1,opt,name=K8S_POD_NAME,json=K8SPODNAME,proto3" json:"K8S_POD_NAME,omitempty"`
	K8S_POD_NAMESPACE          string `protobuf:"bytes,2,opt,name=K8S_POD_NAMESPACE,json=K8SPODNAMESPACE,proto3" json:"K8S_POD_NAMESPACE,omitempty"`
	K8S_POD_INFRA_CONTAINER_ID string `` /* 133-byte string literal not displayed */
	Reason                     string `protobuf:"bytes,5,opt,name=Reason,proto3" json:"Reason,omitempty"`
	ContainerID                string `protobuf:"bytes,8,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"`
	IfName                     string `protobuf:"bytes,6,opt,name=IfName,proto3" json:"IfName,omitempty"`
	NetworkName                string `protobuf:"bytes,7,opt,name=NetworkName,proto3" json:"NetworkName,omitempty"` // next field: 10
	// contains filtered or unexported fields
}

func (*DelNetworkRequest) Descriptor deprecated

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

Deprecated: Use DelNetworkRequest.ProtoReflect.Descriptor instead.

func (*DelNetworkRequest) GetClientVersion added in v1.7.0

func (x *DelNetworkRequest) GetClientVersion() string

func (*DelNetworkRequest) GetContainerID added in v1.6.4

func (x *DelNetworkRequest) GetContainerID() string

func (*DelNetworkRequest) GetIfName added in v1.6.4

func (x *DelNetworkRequest) GetIfName() string

func (*DelNetworkRequest) GetK8S_POD_INFRA_CONTAINER_ID

func (x *DelNetworkRequest) GetK8S_POD_INFRA_CONTAINER_ID() string

func (*DelNetworkRequest) GetK8S_POD_NAME

func (x *DelNetworkRequest) GetK8S_POD_NAME() string

func (*DelNetworkRequest) GetK8S_POD_NAMESPACE

func (x *DelNetworkRequest) GetK8S_POD_NAMESPACE() string

func (*DelNetworkRequest) GetNetworkName added in v1.6.4

func (x *DelNetworkRequest) GetNetworkName() string

func (*DelNetworkRequest) GetReason added in v1.1.0

func (x *DelNetworkRequest) GetReason() string

func (*DelNetworkRequest) ProtoMessage

func (*DelNetworkRequest) ProtoMessage()

func (*DelNetworkRequest) ProtoReflect added in v1.10.0

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

func (*DelNetworkRequest) Reset

func (x *DelNetworkRequest) Reset()

func (*DelNetworkRequest) String

func (x *DelNetworkRequest) String() string

type EnforceNpReply added in v1.17.1

type EnforceNpReply struct {
	Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforceNpReply) Descriptor deprecated added in v1.17.1

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

Deprecated: Use EnforceNpReply.ProtoReflect.Descriptor instead.

func (*EnforceNpReply) GetSuccess added in v1.17.1

func (x *EnforceNpReply) GetSuccess() bool

func (*EnforceNpReply) ProtoMessage added in v1.17.1

func (*EnforceNpReply) ProtoMessage()

func (*EnforceNpReply) ProtoReflect added in v1.17.1

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

func (*EnforceNpReply) Reset added in v1.17.1

func (x *EnforceNpReply) Reset()

func (*EnforceNpReply) String added in v1.17.1

func (x *EnforceNpReply) String() string

type EnforceNpRequest added in v1.17.1

type EnforceNpRequest struct {
	K8S_POD_NAME      string `protobuf:"bytes,1,opt,name=K8S_POD_NAME,json=K8SPODNAME,proto3" json:"K8S_POD_NAME,omitempty"`
	K8S_POD_NAMESPACE string `protobuf:"bytes,2,opt,name=K8S_POD_NAMESPACE,json=K8SPODNAMESPACE,proto3" json:"K8S_POD_NAMESPACE,omitempty"`
	// contains filtered or unexported fields
}

func (*EnforceNpRequest) Descriptor deprecated added in v1.17.1

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

Deprecated: Use EnforceNpRequest.ProtoReflect.Descriptor instead.

func (*EnforceNpRequest) GetK8S_POD_NAME added in v1.17.1

func (x *EnforceNpRequest) GetK8S_POD_NAME() string

func (*EnforceNpRequest) GetK8S_POD_NAMESPACE added in v1.17.1

func (x *EnforceNpRequest) GetK8S_POD_NAMESPACE() string

func (*EnforceNpRequest) ProtoMessage added in v1.17.1

func (*EnforceNpRequest) ProtoMessage()

func (*EnforceNpRequest) ProtoReflect added in v1.17.1

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

func (*EnforceNpRequest) Reset added in v1.17.1

func (x *EnforceNpRequest) Reset()

func (*EnforceNpRequest) String added in v1.17.1

func (x *EnforceNpRequest) String() string

type NPBackendClient added in v1.17.1

type NPBackendClient interface {
	EnforceNpToPod(ctx context.Context, in *EnforceNpRequest, opts ...grpc.CallOption) (*EnforceNpReply, error)
}

NPBackendClient is the client API for NPBackend service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNPBackendClient added in v1.17.1

func NewNPBackendClient(cc grpc.ClientConnInterface) NPBackendClient

type NPBackendServer added in v1.17.1

type NPBackendServer interface {
	EnforceNpToPod(context.Context, *EnforceNpRequest) (*EnforceNpReply, error)
}

NPBackendServer is the server API for NPBackend service.

type UnimplementedCNIBackendServer added in v1.6.4

type UnimplementedCNIBackendServer struct {
}

UnimplementedCNIBackendServer can be embedded to have forward compatible implementations.

func (*UnimplementedCNIBackendServer) AddNetwork added in v1.6.4

func (*UnimplementedCNIBackendServer) DelNetwork added in v1.6.4

type UnimplementedNPBackendServer added in v1.17.1

type UnimplementedNPBackendServer struct {
}

UnimplementedNPBackendServer can be embedded to have forward compatible implementations.

func (*UnimplementedNPBackendServer) EnforceNpToPod added in v1.17.1

Directories

Path Synopsis
Package mock_rpc is a generated GoMock package.
Package mock_rpc is a generated GoMock package.

Jump to

Keyboard shortcuts

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