rpc

package
v1.0.0-alpha.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Status_name = map[int32]string{
	0: "FREE",
	1: "USING",
	2: "DELETING",
	3: "ERROR",
	4: "DELETED",
}
View Source
var Status_value = map[string]int32{
	"FREE":     0,
	"USING":    1,
	"DELETING": 2,
	"ERROR":    3,
	"DELETED":  4,
}

Functions

func RegisterCNIBackendServer

func RegisterCNIBackendServer(s *grpc.Server, 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)
}

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.ClientConn) CNIBackendClient

type CNIBackendServer

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

CNIBackendServer is the server API for CNIBackend service.

type HostNic

type HostNic struct {
	VxNet                *VxNet   `protobuf:"bytes,1,opt,name=VxNet,json=vxNet,proto3" json:"VxNet,omitempty"`
	ID                   string   `protobuf:"bytes,2,opt,name=ID,json=iD,proto3" json:"ID,omitempty"`
	HardwareAddr         string   `protobuf:"bytes,3,opt,name=HardwareAddr,json=hardwareAddr,proto3" json:"HardwareAddr,omitempty"`
	PrimaryAddress       string   `protobuf:"bytes,4,opt,name=PrimaryAddress,json=primaryAddress,proto3" json:"PrimaryAddress,omitempty"`
	IsPrimary            bool     `protobuf:"varint,5,opt,name=IsPrimary,json=isPrimary,proto3" json:"IsPrimary,omitempty"`
	Using                bool     `protobuf:"varint,6,opt,name=Using,json=using,proto3" json:"Using,omitempty"`
	Reserved             bool     `protobuf:"varint,7,opt,name=Reserved,json=reserved,proto3" json:"Reserved,omitempty"`
	RouteTableNum        int32    `protobuf:"varint,8,opt,name=RouteTableNum,json=routeTableNum,proto3" json:"RouteTableNum,omitempty"`
	Status               Status   `protobuf:"varint,9,opt,name=Status,json=status,proto3,enum=rpc.Status" json:"Status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HostNic) Descriptor

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

func (*HostNic) GetHardwareAddr

func (m *HostNic) GetHardwareAddr() string

func (*HostNic) GetID

func (m *HostNic) GetID() string

func (*HostNic) GetIsPrimary

func (m *HostNic) GetIsPrimary() bool

func (*HostNic) GetPrimaryAddress

func (m *HostNic) GetPrimaryAddress() string

func (*HostNic) GetReserved

func (m *HostNic) GetReserved() bool

func (*HostNic) GetRouteTableNum

func (m *HostNic) GetRouteTableNum() int32

func (*HostNic) GetStatus

func (m *HostNic) GetStatus() Status

func (*HostNic) GetUsing

func (m *HostNic) GetUsing() bool

func (*HostNic) GetVxNet

func (m *HostNic) GetVxNet() *VxNet

func (*HostNic) Marshal

func (m *HostNic) Marshal() (dAtA []byte, err error)

func (*HostNic) MarshalTo

func (m *HostNic) MarshalTo(dAtA []byte) (int, error)

func (*HostNic) MarshalToSizedBuffer

func (m *HostNic) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HostNic) ProtoMessage

func (*HostNic) ProtoMessage()

func (*HostNic) Reset

func (m *HostNic) Reset()

func (*HostNic) Size

func (m *HostNic) Size() (n int)

func (*HostNic) String

func (m *HostNic) String() string

func (*HostNic) Unmarshal

func (m *HostNic) Unmarshal(dAtA []byte) error

func (*HostNic) XXX_DiscardUnknown

func (m *HostNic) XXX_DiscardUnknown()

func (*HostNic) XXX_Marshal

func (m *HostNic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HostNic) XXX_Merge

func (m *HostNic) XXX_Merge(src proto.Message)

func (*HostNic) XXX_Size

func (m *HostNic) XXX_Size() int

func (*HostNic) XXX_Unmarshal

func (m *HostNic) XXX_Unmarshal(b []byte) error

type IPAMMessage

type IPAMMessage struct {
	Args                 *PodInfo `protobuf:"bytes,1,opt,name=Args,json=args,proto3" json:"Args,omitempty"`
	Nic                  *HostNic `protobuf:"bytes,2,opt,name=Nic,json=nic,proto3" json:"Nic,omitempty"`
	Peek                 bool     `protobuf:"varint,3,opt,name=Peek,json=peek,proto3" json:"Peek,omitempty"`
	Delete               bool     `protobuf:"varint,4,opt,name=Delete,json=delete,proto3" json:"Delete,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*IPAMMessage) Descriptor

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

func (*IPAMMessage) GetArgs

func (m *IPAMMessage) GetArgs() *PodInfo

func (*IPAMMessage) GetDelete

func (m *IPAMMessage) GetDelete() bool

func (*IPAMMessage) GetNic

func (m *IPAMMessage) GetNic() *HostNic

func (*IPAMMessage) GetPeek

func (m *IPAMMessage) GetPeek() bool

func (*IPAMMessage) Marshal

func (m *IPAMMessage) Marshal() (dAtA []byte, err error)

func (*IPAMMessage) MarshalTo

func (m *IPAMMessage) MarshalTo(dAtA []byte) (int, error)

func (*IPAMMessage) MarshalToSizedBuffer

func (m *IPAMMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IPAMMessage) ProtoMessage

func (*IPAMMessage) ProtoMessage()

func (*IPAMMessage) Reset

func (m *IPAMMessage) Reset()

func (*IPAMMessage) Size

func (m *IPAMMessage) Size() (n int)

func (*IPAMMessage) String

func (m *IPAMMessage) String() string

func (*IPAMMessage) Unmarshal

func (m *IPAMMessage) Unmarshal(dAtA []byte) error

func (*IPAMMessage) XXX_DiscardUnknown

func (m *IPAMMessage) XXX_DiscardUnknown()

func (*IPAMMessage) XXX_Marshal

func (m *IPAMMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IPAMMessage) XXX_Merge

func (m *IPAMMessage) XXX_Merge(src proto.Message)

func (*IPAMMessage) XXX_Size

func (m *IPAMMessage) XXX_Size() int

func (*IPAMMessage) XXX_Unmarshal

func (m *IPAMMessage) XXX_Unmarshal(b []byte) error

type PodInfo

type PodInfo struct {
	Name                 string   `protobuf:"bytes,1,opt,name=Name,json=name,proto3" json:"Name,omitempty"`
	Namespace            string   `protobuf:"bytes,2,opt,name=Namespace,json=namespace,proto3" json:"Namespace,omitempty"`
	Containter           string   `protobuf:"bytes,3,opt,name=Containter,json=containter,proto3" json:"Containter,omitempty"`
	Netns                string   `protobuf:"bytes,4,opt,name=Netns,json=netns,proto3" json:"Netns,omitempty"`
	IfName               string   `protobuf:"bytes,5,opt,name=IfName,json=ifName,proto3" json:"IfName,omitempty"`
	NicType              string   `protobuf:"bytes,6,opt,name=NicType,json=nicType,proto3" json:"NicType,omitempty"`
	PodIP                string   `protobuf:"bytes,7,opt,name=PodIP,json=podIP,proto3" json:"PodIP,omitempty"`
	HostNic              string   `protobuf:"bytes,8,opt,name=HostNic,json=hostNic,proto3" json:"HostNic,omitempty"`
	VxNet                string   `protobuf:"bytes,9,opt,name=VxNet,json=vxNet,proto3" json:"VxNet,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PodInfo) Descriptor

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

func (*PodInfo) GetContainter

func (m *PodInfo) GetContainter() string

func (*PodInfo) GetHostNic

func (m *PodInfo) GetHostNic() string

func (*PodInfo) GetIfName

func (m *PodInfo) GetIfName() string

func (*PodInfo) GetName

func (m *PodInfo) GetName() string

func (*PodInfo) GetNamespace

func (m *PodInfo) GetNamespace() string

func (*PodInfo) GetNetns

func (m *PodInfo) GetNetns() string

func (*PodInfo) GetNicType

func (m *PodInfo) GetNicType() string

func (*PodInfo) GetPodIP

func (m *PodInfo) GetPodIP() string

func (*PodInfo) GetVxNet

func (m *PodInfo) GetVxNet() string

func (*PodInfo) Marshal

func (m *PodInfo) Marshal() (dAtA []byte, err error)

func (*PodInfo) MarshalTo

func (m *PodInfo) MarshalTo(dAtA []byte) (int, error)

func (*PodInfo) MarshalToSizedBuffer

func (m *PodInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PodInfo) ProtoMessage

func (*PodInfo) ProtoMessage()

func (*PodInfo) Reset

func (m *PodInfo) Reset()

func (*PodInfo) Size

func (m *PodInfo) Size() (n int)

func (*PodInfo) String

func (m *PodInfo) String() string

func (*PodInfo) Unmarshal

func (m *PodInfo) Unmarshal(dAtA []byte) error

func (*PodInfo) XXX_DiscardUnknown

func (m *PodInfo) XXX_DiscardUnknown()

func (*PodInfo) XXX_Marshal

func (m *PodInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PodInfo) XXX_Merge

func (m *PodInfo) XXX_Merge(src proto.Message)

func (*PodInfo) XXX_Size

func (m *PodInfo) XXX_Size() int

func (*PodInfo) XXX_Unmarshal

func (m *PodInfo) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (Status) String

func (x Status) String() string

type UnimplementedCNIBackendServer

type UnimplementedCNIBackendServer struct {
}

UnimplementedCNIBackendServer can be embedded to have forward compatible implementations.

func (*UnimplementedCNIBackendServer) AddNetwork

func (*UnimplementedCNIBackendServer) DelNetwork

type VxNet

type VxNet struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,json=iD,proto3" json:"ID,omitempty"`
	Gateway              string   `protobuf:"bytes,2,opt,name=Gateway,json=gateway,proto3" json:"Gateway,omitempty"`
	Network              string   `protobuf:"bytes,3,opt,name=Network,json=network,proto3" json:"Network,omitempty"`
	RouterID             string   `protobuf:"bytes,4,opt,name=RouterID,json=routerID,proto3" json:"RouterID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VxNet) Descriptor

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

func (*VxNet) GetGateway

func (m *VxNet) GetGateway() string

func (*VxNet) GetID

func (m *VxNet) GetID() string

func (*VxNet) GetNetwork

func (m *VxNet) GetNetwork() string

func (*VxNet) GetRouterID

func (m *VxNet) GetRouterID() string

func (*VxNet) Marshal

func (m *VxNet) Marshal() (dAtA []byte, err error)

func (*VxNet) MarshalTo

func (m *VxNet) MarshalTo(dAtA []byte) (int, error)

func (*VxNet) MarshalToSizedBuffer

func (m *VxNet) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VxNet) ProtoMessage

func (*VxNet) ProtoMessage()

func (*VxNet) Reset

func (m *VxNet) Reset()

func (*VxNet) Size

func (m *VxNet) Size() (n int)

func (*VxNet) String

func (m *VxNet) String() string

func (*VxNet) Unmarshal

func (m *VxNet) Unmarshal(dAtA []byte) error

func (*VxNet) XXX_DiscardUnknown

func (m *VxNet) XXX_DiscardUnknown()

func (*VxNet) XXX_Marshal

func (m *VxNet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VxNet) XXX_Merge

func (m *VxNet) XXX_Merge(src proto.Message)

func (*VxNet) XXX_Size

func (m *VxNet) XXX_Size() int

func (*VxNet) XXX_Unmarshal

func (m *VxNet) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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