Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCNIBackendServer(s grpc.ServiceRegistrar, srv CNIBackendServer)
- type CNIBackendClient
- type CNIBackendServer
- type HostNic
- func (*HostNic) Descriptor() ([]byte, []int)deprecated
- func (x *HostNic) GetHardwareAddr() string
- func (x *HostNic) GetID() string
- func (x *HostNic) GetIsPrimary() bool
- func (x *HostNic) GetPhase() Phase
- func (x *HostNic) GetPrimaryAddress() string
- func (x *HostNic) GetReserved() bool
- func (x *HostNic) GetRouteTableNum() int32
- func (x *HostNic) GetStatus() Status
- func (x *HostNic) GetUsing() bool
- func (x *HostNic) GetVxNet() *VxNet
- func (*HostNic) ProtoMessage()
- func (x *HostNic) ProtoReflect() protoreflect.Message
- func (x *HostNic) Reset()
- func (x *HostNic) String() string
- type IPAMMessage
- func (*IPAMMessage) Descriptor() ([]byte, []int)deprecated
- func (x *IPAMMessage) GetArgs() *PodInfo
- func (x *IPAMMessage) GetDelete() bool
- func (x *IPAMMessage) GetIP() string
- func (x *IPAMMessage) GetNic() *HostNic
- func (x *IPAMMessage) GetPeek() bool
- func (*IPAMMessage) ProtoMessage()
- func (x *IPAMMessage) ProtoReflect() protoreflect.Message
- func (x *IPAMMessage) Reset()
- func (x *IPAMMessage) String() string
- type NicInfo
- func (*NicInfo) Descriptor() ([]byte, []int)deprecated
- func (x *NicInfo) GetId() string
- func (x *NicInfo) GetPhase() string
- func (x *NicInfo) GetPods() int32
- func (x *NicInfo) GetStatus() string
- func (x *NicInfo) GetVxnet() string
- func (*NicInfo) ProtoMessage()
- func (x *NicInfo) ProtoReflect() protoreflect.Message
- func (x *NicInfo) Reset()
- func (x *NicInfo) String() string
- type NicInfoList
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetClusterID() string
- func (x *Node) GetHostMachine() string
- func (x *Node) GetInstanceID() string
- func (x *Node) GetNodeID() string
- func (x *Node) GetPrivateIP() string
- func (x *Node) GetStatus() string
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- type Nothing
- type Phase
- type PodInfo
- func (*PodInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PodInfo) GetContainter() string
- func (x *PodInfo) GetHostNic() string
- func (x *PodInfo) GetIfName() string
- func (x *PodInfo) GetName() string
- func (x *PodInfo) GetNamespace() string
- func (x *PodInfo) GetNetns() string
- func (x *PodInfo) GetNicType() string
- func (x *PodInfo) GetPodIP() string
- func (x *PodInfo) GetVxNet() string
- func (*PodInfo) ProtoMessage()
- func (x *PodInfo) ProtoReflect() protoreflect.Message
- func (x *PodInfo) Reset()
- func (x *PodInfo) String() string
- type SecurityGroupRule
- func (*SecurityGroupRule) Descriptor() ([]byte, []int)deprecated
- func (x *SecurityGroupRule) GetAction() string
- func (x *SecurityGroupRule) GetDirection() int32
- func (x *SecurityGroupRule) GetID() string
- func (x *SecurityGroupRule) GetName() string
- func (x *SecurityGroupRule) GetPriority() int32
- func (x *SecurityGroupRule) GetProtocol() string
- func (x *SecurityGroupRule) GetSecurityGroupID() string
- func (x *SecurityGroupRule) GetVal3() string
- func (*SecurityGroupRule) ProtoMessage()
- func (x *SecurityGroupRule) ProtoReflect() protoreflect.Message
- func (x *SecurityGroupRule) Reset()
- func (x *SecurityGroupRule) String() string
- type Status
- type UnimplementedCNIBackendServer
- func (UnimplementedCNIBackendServer) AddNetwork(context.Context, *IPAMMessage) (*IPAMMessage, error)
- func (UnimplementedCNIBackendServer) ClearNics(context.Context, *Nothing) (*Nothing, error)
- func (UnimplementedCNIBackendServer) DelNetwork(context.Context, *IPAMMessage) (*IPAMMessage, error)
- func (UnimplementedCNIBackendServer) ShowNics(context.Context, *Nothing) (*NicInfoList, error)
- type UnsafeCNIBackendServer
- type VIP
- func (*VIP) Descriptor() ([]byte, []int)deprecated
- func (x *VIP) GetAddr() string
- func (x *VIP) GetID() string
- func (x *VIP) GetName() string
- func (x *VIP) GetVxNetID() string
- func (*VIP) ProtoMessage()
- func (x *VIP) ProtoReflect() protoreflect.Message
- func (x *VIP) Reset()
- func (x *VIP) String() string
- type VxNet
- func (*VxNet) Descriptor() ([]byte, []int)deprecated
- func (x *VxNet) GetGateway() string
- func (x *VxNet) GetID() string
- func (x *VxNet) GetIPEnd() string
- func (x *VxNet) GetIPStart() string
- func (x *VxNet) GetNetwork() string
- func (x *VxNet) GetRouterID() string
- func (x *VxNet) GetTunnelType() string
- func (*VxNet) ProtoMessage()
- func (x *VxNet) ProtoReflect() protoreflect.Message
- func (x *VxNet) Reset()
- func (x *VxNet) String() string
Constants ¶
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 ¶
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.
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.
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)
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) GetHardwareAddr ¶
func (*HostNic) GetIsPrimary ¶
func (*HostNic) GetPrimaryAddress ¶
func (*HostNic) GetReserved ¶
func (*HostNic) GetRouteTableNum ¶
func (*HostNic) ProtoMessage ¶
func (*HostNic) ProtoMessage()
func (*HostNic) ProtoReflect ¶ added in v1.0.5
func (x *HostNic) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*NicInfo) ProtoMessage()
func (*NicInfo) ProtoReflect ¶ added in v1.0.5
func (x *NicInfo) ProtoReflect() protoreflect.Message
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) GetClusterID ¶
func (*Node) GetHostMachine ¶
func (*Node) GetInstanceID ¶
func (*Node) GetPrivateIP ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶ added in v1.0.5
func (x *Node) ProtoReflect() protoreflect.Message
type Nothing ¶
type Nothing struct {
// contains filtered or unexported fields
}
func (*Nothing) Descriptor
deprecated
func (*Nothing) ProtoMessage ¶
func (*Nothing) ProtoMessage()
func (*Nothing) ProtoReflect ¶ added in v1.0.5
func (x *Nothing) ProtoReflect() protoreflect.Message
type Phase ¶
type Phase int32
func (Phase) Descriptor ¶ added in v1.0.5
func (Phase) Descriptor() protoreflect.EnumDescriptor
func (Phase) EnumDescriptor
deprecated
func (Phase) Number ¶ added in v1.0.5
func (x Phase) Number() protoreflect.EnumNumber
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) GetContainter ¶
func (*PodInfo) GetHostNic ¶
func (*PodInfo) GetNamespace ¶
func (*PodInfo) GetNicType ¶
func (*PodInfo) ProtoMessage ¶
func (*PodInfo) ProtoMessage()
func (*PodInfo) ProtoReflect ¶ added in v1.0.5
func (x *PodInfo) ProtoReflect() protoreflect.Message
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
func (Status) Descriptor ¶ added in v1.0.5
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶ added in v1.0.5
func (x Status) Number() protoreflect.EnumNumber
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) AddNetwork(context.Context, *IPAMMessage) (*IPAMMessage, error)
func (UnimplementedCNIBackendServer) DelNetwork ¶
func (UnimplementedCNIBackendServer) DelNetwork(context.Context, *IPAMMessage) (*IPAMMessage, error)
func (UnimplementedCNIBackendServer) ShowNics ¶
func (UnimplementedCNIBackendServer) ShowNics(context.Context, *Nothing) (*NicInfoList, error)
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) GetVxNetID ¶
func (*VIP) ProtoMessage ¶
func (*VIP) ProtoMessage()
func (*VIP) ProtoReflect ¶ added in v1.0.5
func (x *VIP) ProtoReflect() protoreflect.Message
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) GetGateway ¶
func (*VxNet) GetIPStart ¶
func (*VxNet) GetNetwork ¶
func (*VxNet) GetRouterID ¶
func (*VxNet) GetTunnelType ¶ added in v1.0.5
func (*VxNet) ProtoMessage ¶
func (*VxNet) ProtoMessage()
func (*VxNet) ProtoReflect ¶ added in v1.0.5
func (x *VxNet) ProtoReflect() protoreflect.Message