rpc

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CNIBackend_AddNetwork_FullMethodName = "/rpc.CNIBackend/AddNetwork"
	CNIBackend_DelNetwork_FullMethodName = "/rpc.CNIBackend/DelNetwork"
	CNIBackend_ShowNics_FullMethodName   = "/rpc.CNIBackend/ShowNics"
	CNIBackend_ClearNics_FullMethodName  = "/rpc.CNIBackend/ClearNics"
)

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "FREE",
		1: "USING",
		2: "DELETING",
		3: "ERROR",
		4: "DELETED",
	}
	Status_value = map[string]int32{
		"FREE":     0,
		"USING":    1,
		"DELETING": 2,
		"ERROR":    3,
		"DELETED":  4,
	}
)

Enum value maps for Status.

View Source
var (
	Phase_name = map[int32]string{
		0: "Init",
		1: "CreateAndAttach",
		2: "JoinBridge",
		3: "SetRouteTable",
		4: "Succeeded",
	}
	Phase_value = map[string]int32{
		"Init":            0,
		"CreateAndAttach": 1,
		"JoinBridge":      2,
		"SetRouteTable":   3,
		"Succeeded":       4,
	}
)

Enum value maps for Phase.

View Source
var CNIBackend_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpc.CNIBackend",
	HandlerType: (*CNIBackendServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddNetwork",
			Handler:    _CNIBackend_AddNetwork_Handler,
		},
		{
			MethodName: "DelNetwork",
			Handler:    _CNIBackend_DelNetwork_Handler,
		},
		{
			MethodName: "ShowNics",
			Handler:    _CNIBackend_ShowNics_Handler,
		},
		{
			MethodName: "ClearNics",
			Handler:    _CNIBackend_ClearNics_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/rpc/message.proto",
}

CNIBackend_ServiceDesc is the grpc.ServiceDesc for CNIBackend 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_pkg_rpc_message_proto protoreflect.FileDescriptor

Functions

func RegisterCNIBackendServer

func RegisterCNIBackendServer(s grpc.ServiceRegistrar, srv CNIBackendServer)

Types

type CNIBackendClient

type CNIBackendClient interface {
	AddNetwork(ctx context.Context, in *IPAMMessage, opts ...grpc.CallOption) (*IPAMMessage, error)
	DelNetwork(ctx context.Context, in *IPAMMessage, opts ...grpc.CallOption) (*IPAMMessage, error)
	ShowNics(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*NicInfoList, error)
	ClearNics(ctx context.Context, in *Nothing, opts ...grpc.CallOption) (*Nothing, error)
}

CNIBackendClient is the client API for CNIBackend 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 NewCNIBackendClient

func NewCNIBackendClient(cc grpc.ClientConnInterface) CNIBackendClient

type CNIBackendServer

type CNIBackendServer interface {
	AddNetwork(context.Context, *IPAMMessage) (*IPAMMessage, error)
	DelNetwork(context.Context, *IPAMMessage) (*IPAMMessage, error)
	ShowNics(context.Context, *Nothing) (*NicInfoList, error)
	ClearNics(context.Context, *Nothing) (*Nothing, error)
}

CNIBackendServer is the server API for CNIBackend service. All implementations should embed UnimplementedCNIBackendServer for forward compatibility

type HostNic

type HostNic struct {
	VxNet          *VxNet `protobuf:"bytes,1,opt,name=VxNet,proto3" json:"VxNet,omitempty"`
	ID             string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"`
	HardwareAddr   string `protobuf:"bytes,3,opt,name=HardwareAddr,proto3" json:"HardwareAddr,omitempty"`
	PrimaryAddress string `protobuf:"bytes,4,opt,name=PrimaryAddress,proto3" json:"PrimaryAddress,omitempty"`
	IsPrimary      bool   `protobuf:"varint,5,opt,name=IsPrimary,proto3" json:"IsPrimary,omitempty"`
	Using          bool   `protobuf:"varint,6,opt,name=Using,proto3" json:"Using,omitempty"`
	Reserved       bool   `protobuf:"varint,7,opt,name=Reserved,proto3" json:"Reserved,omitempty"`
	RouteTableNum  int32  `protobuf:"varint,8,opt,name=RouteTableNum,proto3" json:"RouteTableNum,omitempty"`
	Status         Status `protobuf:"varint,9,opt,name=Status,proto3,enum=rpc.Status" json:"Status,omitempty"`
	Phase          Phase  `protobuf:"varint,10,opt,name=Phase,proto3,enum=rpc.Phase" json:"Phase,omitempty"`
	// contains filtered or unexported fields
}

func (*HostNic) Descriptor deprecated

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

Deprecated: Use HostNic.ProtoReflect.Descriptor instead.

func (*HostNic) GetHardwareAddr

func (x *HostNic) GetHardwareAddr() string

func (*HostNic) GetID

func (x *HostNic) GetID() string

func (*HostNic) GetIsPrimary

func (x *HostNic) GetIsPrimary() bool

func (*HostNic) GetPhase

func (x *HostNic) GetPhase() Phase

func (*HostNic) GetPrimaryAddress

func (x *HostNic) GetPrimaryAddress() string

func (*HostNic) GetReserved

func (x *HostNic) GetReserved() bool

func (*HostNic) GetRouteTableNum

func (x *HostNic) GetRouteTableNum() int32

func (*HostNic) GetStatus

func (x *HostNic) GetStatus() Status

func (*HostNic) GetUsing

func (x *HostNic) GetUsing() bool

func (*HostNic) GetVxNet

func (x *HostNic) GetVxNet() *VxNet

func (*HostNic) ProtoMessage

func (*HostNic) ProtoMessage()

func (*HostNic) ProtoReflect added in v1.0.5

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

func (*HostNic) Reset

func (x *HostNic) Reset()

func (*HostNic) String

func (x *HostNic) String() string

type IPAMMessage

type IPAMMessage struct {
	Args   *PodInfo `protobuf:"bytes,1,opt,name=Args,proto3" json:"Args,omitempty"`
	Nic    *HostNic `protobuf:"bytes,2,opt,name=Nic,proto3" json:"Nic,omitempty"`
	Peek   bool     `protobuf:"varint,3,opt,name=Peek,proto3" json:"Peek,omitempty"`
	Delete bool     `protobuf:"varint,4,opt,name=Delete,proto3" json:"Delete,omitempty"`
	IP     string   `protobuf:"bytes,5,opt,name=IP,proto3" json:"IP,omitempty"`
	// contains filtered or unexported fields
}

func (*IPAMMessage) Descriptor deprecated

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

Deprecated: Use IPAMMessage.ProtoReflect.Descriptor instead.

func (*IPAMMessage) GetArgs

func (x *IPAMMessage) GetArgs() *PodInfo

func (*IPAMMessage) GetDelete

func (x *IPAMMessage) GetDelete() bool

func (*IPAMMessage) GetIP

func (x *IPAMMessage) GetIP() string

func (*IPAMMessage) GetNic

func (x *IPAMMessage) GetNic() *HostNic

func (*IPAMMessage) GetPeek

func (x *IPAMMessage) GetPeek() bool

func (*IPAMMessage) ProtoMessage

func (*IPAMMessage) ProtoMessage()

func (*IPAMMessage) ProtoReflect added in v1.0.5

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

func (*IPAMMessage) Reset

func (x *IPAMMessage) Reset()

func (*IPAMMessage) String

func (x *IPAMMessage) String() string

type NicInfo

type NicInfo struct {
	Id     string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Vxnet  string `protobuf:"bytes,2,opt,name=Vxnet,proto3" json:"Vxnet,omitempty"`
	Phase  string `protobuf:"bytes,3,opt,name=Phase,proto3" json:"Phase,omitempty"`
	Status string `protobuf:"bytes,4,opt,name=Status,proto3" json:"Status,omitempty"`
	Pods   int32  `protobuf:"varint,5,opt,name=Pods,proto3" json:"Pods,omitempty"`
	// contains filtered or unexported fields
}

func (*NicInfo) Descriptor deprecated

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

Deprecated: Use NicInfo.ProtoReflect.Descriptor instead.

func (*NicInfo) GetId

func (x *NicInfo) GetId() string

func (*NicInfo) GetPhase

func (x *NicInfo) GetPhase() string

func (*NicInfo) GetPods

func (x *NicInfo) GetPods() int32

func (*NicInfo) GetStatus

func (x *NicInfo) GetStatus() string

func (*NicInfo) GetVxnet

func (x *NicInfo) GetVxnet() string

func (*NicInfo) ProtoMessage

func (*NicInfo) ProtoMessage()

func (*NicInfo) ProtoReflect added in v1.0.5

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

func (*NicInfo) Reset

func (x *NicInfo) Reset()

func (*NicInfo) String

func (x *NicInfo) String() string

type NicInfoList

type NicInfoList struct {
	Items []*NicInfo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*NicInfoList) Descriptor deprecated

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

Deprecated: Use NicInfoList.ProtoReflect.Descriptor instead.

func (*NicInfoList) GetItems

func (x *NicInfoList) GetItems() []*NicInfo

func (*NicInfoList) ProtoMessage

func (*NicInfoList) ProtoMessage()

func (*NicInfoList) ProtoReflect added in v1.0.5

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

func (*NicInfoList) Reset

func (x *NicInfoList) Reset()

func (*NicInfoList) String

func (x *NicInfoList) String() string

type Node

type Node struct {
	InstanceID  string `protobuf:"bytes,1,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"`
	NodeID      string `protobuf:"bytes,2,opt,name=NodeID,proto3" json:"NodeID,omitempty"`
	HostMachine string `protobuf:"bytes,3,opt,name=HostMachine,proto3" json:"HostMachine,omitempty"`
	PrivateIP   string `protobuf:"bytes,4,opt,name=PrivateIP,proto3" json:"PrivateIP,omitempty"`
	ClusterID   string `protobuf:"bytes,5,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"`
	Status      string `protobuf:"bytes,6,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetClusterID

func (x *Node) GetClusterID() string

func (*Node) GetHostMachine

func (x *Node) GetHostMachine() string

func (*Node) GetInstanceID

func (x *Node) GetInstanceID() string

func (*Node) GetNodeID

func (x *Node) GetNodeID() string

func (*Node) GetPrivateIP

func (x *Node) GetPrivateIP() string

func (*Node) GetStatus

func (x *Node) GetStatus() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect added in v1.0.5

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type Nothing

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

func (*Nothing) Descriptor deprecated

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

Deprecated: Use Nothing.ProtoReflect.Descriptor instead.

func (*Nothing) ProtoMessage

func (*Nothing) ProtoMessage()

func (*Nothing) ProtoReflect added in v1.0.5

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

func (*Nothing) Reset

func (x *Nothing) Reset()

func (*Nothing) String

func (x *Nothing) String() string

type Phase

type Phase int32
const (
	Phase_Init            Phase = 0
	Phase_CreateAndAttach Phase = 1
	Phase_JoinBridge      Phase = 2
	Phase_SetRouteTable   Phase = 3
	Phase_Succeeded       Phase = 4
)

func (Phase) Descriptor added in v1.0.5

func (Phase) Descriptor() protoreflect.EnumDescriptor

func (Phase) Enum added in v1.0.5

func (x Phase) Enum() *Phase

func (Phase) EnumDescriptor deprecated

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

Deprecated: Use Phase.Descriptor instead.

func (Phase) Number added in v1.0.5

func (x Phase) Number() protoreflect.EnumNumber

func (Phase) String

func (x Phase) String() string

func (Phase) Type added in v1.0.5

func (Phase) Type() protoreflect.EnumType

type PodInfo

type PodInfo struct {
	Name       string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Namespace  string `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	Containter string `protobuf:"bytes,3,opt,name=Containter,proto3" json:"Containter,omitempty"`
	Netns      string `protobuf:"bytes,4,opt,name=Netns,proto3" json:"Netns,omitempty"`
	IfName     string `protobuf:"bytes,5,opt,name=IfName,proto3" json:"IfName,omitempty"`
	NicType    string `protobuf:"bytes,6,opt,name=NicType,proto3" json:"NicType,omitempty"`
	PodIP      string `protobuf:"bytes,7,opt,name=PodIP,proto3" json:"PodIP,omitempty"`
	HostNic    string `protobuf:"bytes,8,opt,name=HostNic,proto3" json:"HostNic,omitempty"`
	VxNet      string `protobuf:"bytes,9,opt,name=VxNet,proto3" json:"VxNet,omitempty"`
	// contains filtered or unexported fields
}

func (*PodInfo) Descriptor deprecated

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

Deprecated: Use PodInfo.ProtoReflect.Descriptor instead.

func (*PodInfo) GetContainter

func (x *PodInfo) GetContainter() string

func (*PodInfo) GetHostNic

func (x *PodInfo) GetHostNic() string

func (*PodInfo) GetIfName

func (x *PodInfo) GetIfName() string

func (*PodInfo) GetName

func (x *PodInfo) GetName() string

func (*PodInfo) GetNamespace

func (x *PodInfo) GetNamespace() string

func (*PodInfo) GetNetns

func (x *PodInfo) GetNetns() string

func (*PodInfo) GetNicType

func (x *PodInfo) GetNicType() string

func (*PodInfo) GetPodIP

func (x *PodInfo) GetPodIP() string

func (*PodInfo) GetVxNet

func (x *PodInfo) GetVxNet() string

func (*PodInfo) ProtoMessage

func (*PodInfo) ProtoMessage()

func (*PodInfo) ProtoReflect added in v1.0.5

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

func (*PodInfo) Reset

func (x *PodInfo) Reset()

func (*PodInfo) String

func (x *PodInfo) String() string

type SecurityGroupRule

type SecurityGroupRule struct {
	ID              string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name            string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	SecurityGroupID string `protobuf:"bytes,3,opt,name=SecurityGroupID,proto3" json:"SecurityGroupID,omitempty"`
	Action          string `protobuf:"bytes,4,opt,name=Action,proto3" json:"Action,omitempty"`
	Protocol        string `protobuf:"bytes,7,opt,name=Protocol,proto3" json:"Protocol,omitempty"`
	Val3            string `protobuf:"bytes,8,opt,name=Val3,proto3" json:"Val3,omitempty"`
	Direction       int32  `protobuf:"varint,5,opt,name=Direction,proto3" json:"Direction,omitempty"`
	Priority        int32  `protobuf:"varint,6,opt,name=Priority,proto3" json:"Priority,omitempty"`
	// contains filtered or unexported fields
}

func (*SecurityGroupRule) Descriptor deprecated

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

Deprecated: Use SecurityGroupRule.ProtoReflect.Descriptor instead.

func (*SecurityGroupRule) GetAction

func (x *SecurityGroupRule) GetAction() string

func (*SecurityGroupRule) GetDirection

func (x *SecurityGroupRule) GetDirection() int32

func (*SecurityGroupRule) GetID

func (x *SecurityGroupRule) GetID() string

func (*SecurityGroupRule) GetName

func (x *SecurityGroupRule) GetName() string

func (*SecurityGroupRule) GetPriority

func (x *SecurityGroupRule) GetPriority() int32

func (*SecurityGroupRule) GetProtocol

func (x *SecurityGroupRule) GetProtocol() string

func (*SecurityGroupRule) GetSecurityGroupID

func (x *SecurityGroupRule) GetSecurityGroupID() string

func (*SecurityGroupRule) GetVal3

func (x *SecurityGroupRule) GetVal3() string

func (*SecurityGroupRule) ProtoMessage

func (*SecurityGroupRule) ProtoMessage()

func (*SecurityGroupRule) ProtoReflect added in v1.0.5

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

func (*SecurityGroupRule) Reset

func (x *SecurityGroupRule) Reset()

func (*SecurityGroupRule) String

func (x *SecurityGroupRule) String() string

type Status

type Status int32
const (
	Status_FREE     Status = 0
	Status_USING    Status = 1
	Status_DELETING Status = 2
	Status_ERROR    Status = 3
	Status_DELETED  Status = 4
)

func (Status) Descriptor added in v1.0.5

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum added in v1.0.5

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number added in v1.0.5

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type added in v1.0.5

func (Status) Type() protoreflect.EnumType

type UnimplementedCNIBackendServer

type UnimplementedCNIBackendServer struct {
}

UnimplementedCNIBackendServer should be embedded to have forward compatible implementations.

func (UnimplementedCNIBackendServer) AddNetwork

func (UnimplementedCNIBackendServer) ClearNics

func (UnimplementedCNIBackendServer) DelNetwork

func (UnimplementedCNIBackendServer) ShowNics

type UnsafeCNIBackendServer added in v1.0.5

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

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

type VIP

type VIP struct {
	ID      string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Addr    string `protobuf:"bytes,3,opt,name=Addr,proto3" json:"Addr,omitempty"`
	VxNetID string `protobuf:"bytes,4,opt,name=VxNetID,proto3" json:"VxNetID,omitempty"`
	// contains filtered or unexported fields
}

func (*VIP) Descriptor deprecated

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

Deprecated: Use VIP.ProtoReflect.Descriptor instead.

func (*VIP) GetAddr

func (x *VIP) GetAddr() string

func (*VIP) GetID

func (x *VIP) GetID() string

func (*VIP) GetName

func (x *VIP) GetName() string

func (*VIP) GetVxNetID

func (x *VIP) GetVxNetID() string

func (*VIP) ProtoMessage

func (*VIP) ProtoMessage()

func (*VIP) ProtoReflect added in v1.0.5

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

func (*VIP) Reset

func (x *VIP) Reset()

func (*VIP) String

func (x *VIP) String() string

type VxNet

type VxNet struct {
	ID         string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Gateway    string `protobuf:"bytes,2,opt,name=Gateway,proto3" json:"Gateway,omitempty"`
	Network    string `protobuf:"bytes,3,opt,name=Network,proto3" json:"Network,omitempty"`
	RouterID   string `protobuf:"bytes,4,opt,name=RouterID,proto3" json:"RouterID,omitempty"`
	IPStart    string `protobuf:"bytes,5,opt,name=IPStart,proto3" json:"IPStart,omitempty"`
	IPEnd      string `protobuf:"bytes,6,opt,name=IPEnd,proto3" json:"IPEnd,omitempty"`
	TunnelType string `protobuf:"bytes,7,opt,name=TunnelType,proto3" json:"TunnelType,omitempty"`
	// contains filtered or unexported fields
}

func (*VxNet) Descriptor deprecated

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

Deprecated: Use VxNet.ProtoReflect.Descriptor instead.

func (*VxNet) GetGateway

func (x *VxNet) GetGateway() string

func (*VxNet) GetID

func (x *VxNet) GetID() string

func (*VxNet) GetIPEnd

func (x *VxNet) GetIPEnd() string

func (*VxNet) GetIPStart

func (x *VxNet) GetIPStart() string

func (*VxNet) GetNetwork

func (x *VxNet) GetNetwork() string

func (*VxNet) GetRouterID

func (x *VxNet) GetRouterID() string

func (*VxNet) GetTunnelType added in v1.0.5

func (x *VxNet) GetTunnelType() string

func (*VxNet) ProtoMessage

func (*VxNet) ProtoMessage()

func (*VxNet) ProtoReflect added in v1.0.5

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

func (*VxNet) Reset

func (x *VxNet) Reset()

func (*VxNet) String

func (x *VxNet) String() string

Jump to

Keyboard shortcuts

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