rpc

package
v0.0.0-...-58e557b Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 File_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 *NICMMessage, opts ...grpc.CallOption) (*NICMMessage, error)
	DelNetwork(ctx context.Context, in *NICMMessage, opts ...grpc.CallOption) (*NICMMessage, error)
	GetNicStat(ctx context.Context, in *NicStatMessage, opts ...grpc.CallOption) (*NicStatMessage, 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, *NICMMessage) (*NICMMessage, error)
	DelNetwork(context.Context, *NICMMessage) (*NICMMessage, error)
	GetNicStat(context.Context, *NicStatMessage) (*NicStatMessage, error)
	// contains filtered or unexported methods
}

CNIBackendServer is the server API for CNIBackend service. All implementations must 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=Status" json:"Status,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) 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

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

func (*HostNic) Reset

func (x *HostNic) Reset()

func (*HostNic) String

func (x *HostNic) String() string

type NICMMessage

type NICMMessage 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"`
	NAD     string   `protobuf:"bytes,3,opt,name=NAD,proto3" json:"NAD,omitempty"`
	IPStart string   `protobuf:"bytes,4,opt,name=IPStart,proto3" json:"IPStart,omitempty"`
	IPEnd   string   `protobuf:"bytes,5,opt,name=IPEnd,proto3" json:"IPEnd,omitempty"`
	// contains filtered or unexported fields
}

func (*NICMMessage) Descriptor deprecated

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

Deprecated: Use NICMMessage.ProtoReflect.Descriptor instead.

func (*NICMMessage) GetArgs

func (x *NICMMessage) GetArgs() *PodInfo

func (*NICMMessage) GetIPEnd

func (x *NICMMessage) GetIPEnd() string

func (*NICMMessage) GetIPStart

func (x *NICMMessage) GetIPStart() string

func (*NICMMessage) GetNAD

func (x *NICMMessage) GetNAD() string

func (*NICMMessage) GetNic

func (x *NICMMessage) GetNic() *HostNic

func (*NICMMessage) ProtoMessage

func (*NICMMessage) ProtoMessage()

func (*NICMMessage) ProtoReflect

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

func (*NICMMessage) Reset

func (x *NICMMessage) Reset()

func (*NICMMessage) String

func (x *NICMMessage) String() string

type NicStatMessage

type NicStatMessage struct {
	Count    int32  `protobuf:"varint,1,opt,name=Count,proto3" json:"Count,omitempty"`
	NodeName string `protobuf:"bytes,2,opt,name=NodeName,proto3" json:"NodeName,omitempty"`
	// contains filtered or unexported fields
}

func (*NicStatMessage) Descriptor deprecated

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

Deprecated: Use NicStatMessage.ProtoReflect.Descriptor instead.

func (*NicStatMessage) GetCount

func (x *NicStatMessage) GetCount() int32

func (*NicStatMessage) GetNodeName

func (x *NicStatMessage) GetNodeName() string

func (*NicStatMessage) ProtoMessage

func (*NicStatMessage) ProtoMessage()

func (*NicStatMessage) ProtoReflect

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

func (*NicStatMessage) Reset

func (x *NicStatMessage) Reset()

func (*NicStatMessage) String

func (x *NicStatMessage) String() string

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

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

func (*PodInfo) Reset

func (x *PodInfo) Reset()

func (*PodInfo) String

func (x *PodInfo) 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

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedCNIBackendServer

type UnimplementedCNIBackendServer struct {
}

UnimplementedCNIBackendServer must be embedded to have forward compatible implementations.

func (UnimplementedCNIBackendServer) AddNetwork

func (UnimplementedCNIBackendServer) DelNetwork

func (UnimplementedCNIBackendServer) GetNicStat

type UnsafeCNIBackendServer

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 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"`
	// 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) GetNetwork

func (x *VxNet) GetNetwork() string

func (*VxNet) GetRouterID

func (x *VxNet) GetRouterID() string

func (*VxNet) ProtoMessage

func (*VxNet) ProtoMessage()

func (*VxNet) ProtoReflect

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