Documentation ¶
Index ¶
- Variables
- func RegisterCniServer(s *grpc.Server, srv CniServer)
- type CniClient
- type CniCmdArgs
- func (*CniCmdArgs) Descriptor() ([]byte, []int)deprecated
- func (x *CniCmdArgs) GetArgs() string
- func (x *CniCmdArgs) GetContainerId() string
- func (x *CniCmdArgs) GetIfname() string
- func (x *CniCmdArgs) GetNetns() string
- func (x *CniCmdArgs) GetNetworkConfiguration() []byte
- func (x *CniCmdArgs) GetPath() string
- func (*CniCmdArgs) ProtoMessage()
- func (x *CniCmdArgs) ProtoReflect() protoreflect.Message
- func (x *CniCmdArgs) Reset()
- func (x *CniCmdArgs) String() string
- type CniCmdRequest
- type CniCmdResponse
- func (*CniCmdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CniCmdResponse) GetCniResult() []byte
- func (x *CniCmdResponse) GetError() *Error
- func (*CniCmdResponse) ProtoMessage()
- func (x *CniCmdResponse) ProtoReflect() protoreflect.Message
- func (x *CniCmdResponse) Reset()
- func (x *CniCmdResponse) String() string
- type CniServer
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() ErrorCode
- func (x *Error) GetDetails() []*any.Any
- func (x *Error) GetMessage() string
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type ErrorCode
- type UnimplementedCniServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorCode_name = map[int32]string{ 0: "UNKNOWN", 1: "INCOMPATIBLE_CNI_VERSION", 2: "UNSUPPORTED_FIELD", 3: "UNKNOWN_CONTAINER", 4: "INVALID_ENVIRONMENT_VARIABLES", 5: "IO_FAILURE", 6: "DECODING_FAILURE", 7: "INVALID_NETWORK_CONFIG", 11: "TRY_AGAIN_LATER", 101: "IPAM_FAILURE", 102: "CONFIG_INTERFACE_FAILURE", 103: "CHECK_INTERFACE_FAILURE", 201: "UNKNOWN_RPC_ERROR", 202: "INCOMPATIBLE_API_VERSION", } ErrorCode_value = map[string]int32{ "UNKNOWN": 0, "INCOMPATIBLE_CNI_VERSION": 1, "UNSUPPORTED_FIELD": 2, "UNKNOWN_CONTAINER": 3, "INVALID_ENVIRONMENT_VARIABLES": 4, "IO_FAILURE": 5, "DECODING_FAILURE": 6, "INVALID_NETWORK_CONFIG": 7, "TRY_AGAIN_LATER": 11, "IPAM_FAILURE": 101, "CONFIG_INTERFACE_FAILURE": 102, "CHECK_INTERFACE_FAILURE": 103, "UNKNOWN_RPC_ERROR": 201, "INCOMPATIBLE_API_VERSION": 202, } )
Enum value maps for ErrorCode.
View Source
var File_pkg_apis_cni_v1beta1_cni_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCniServer ¶
Types ¶
type CniClient ¶
type CniClient interface { CmdAdd(ctx context.Context, in *CniCmdRequest, opts ...grpc.CallOption) (*CniCmdResponse, error) CmdCheck(ctx context.Context, in *CniCmdRequest, opts ...grpc.CallOption) (*CniCmdResponse, error) CmdDel(ctx context.Context, in *CniCmdRequest, opts ...grpc.CallOption) (*CniCmdResponse, error) }
CniClient is the client API for Cni service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCniClient ¶
func NewCniClient(cc grpc.ClientConnInterface) CniClient
type CniCmdArgs ¶
type CniCmdArgs struct { ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Netns string `protobuf:"bytes,2,opt,name=netns,proto3" json:"netns,omitempty"` Ifname string `protobuf:"bytes,3,opt,name=ifname,proto3" json:"ifname,omitempty"` Args string `protobuf:"bytes,4,opt,name=args,proto3" json:"args,omitempty"` Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` NetworkConfiguration []byte `protobuf:"bytes,6,opt,name=network_configuration,json=networkConfiguration,proto3" json:"network_configuration,omitempty"` // contains filtered or unexported fields }
func (*CniCmdArgs) Descriptor
deprecated
func (*CniCmdArgs) Descriptor() ([]byte, []int)
Deprecated: Use CniCmdArgs.ProtoReflect.Descriptor instead.
func (*CniCmdArgs) GetArgs ¶
func (x *CniCmdArgs) GetArgs() string
func (*CniCmdArgs) GetContainerId ¶
func (x *CniCmdArgs) GetContainerId() string
func (*CniCmdArgs) GetIfname ¶
func (x *CniCmdArgs) GetIfname() string
func (*CniCmdArgs) GetNetns ¶
func (x *CniCmdArgs) GetNetns() string
func (*CniCmdArgs) GetNetworkConfiguration ¶
func (x *CniCmdArgs) GetNetworkConfiguration() []byte
func (*CniCmdArgs) GetPath ¶
func (x *CniCmdArgs) GetPath() string
func (*CniCmdArgs) ProtoMessage ¶
func (*CniCmdArgs) ProtoMessage()
func (*CniCmdArgs) ProtoReflect ¶ added in v1.4.0
func (x *CniCmdArgs) ProtoReflect() protoreflect.Message
func (*CniCmdArgs) Reset ¶
func (x *CniCmdArgs) Reset()
func (*CniCmdArgs) String ¶
func (x *CniCmdArgs) String() string
type CniCmdRequest ¶
type CniCmdRequest struct { CniArgs *CniCmdArgs `protobuf:"bytes,1,opt,name=cni_args,json=cniArgs,proto3" json:"cni_args,omitempty"` // contains filtered or unexported fields }
func (*CniCmdRequest) Descriptor
deprecated
func (*CniCmdRequest) Descriptor() ([]byte, []int)
Deprecated: Use CniCmdRequest.ProtoReflect.Descriptor instead.
func (*CniCmdRequest) GetCniArgs ¶
func (x *CniCmdRequest) GetCniArgs() *CniCmdArgs
func (*CniCmdRequest) ProtoMessage ¶
func (*CniCmdRequest) ProtoMessage()
func (*CniCmdRequest) ProtoReflect ¶ added in v1.4.0
func (x *CniCmdRequest) ProtoReflect() protoreflect.Message
func (*CniCmdRequest) Reset ¶
func (x *CniCmdRequest) Reset()
func (*CniCmdRequest) String ¶
func (x *CniCmdRequest) String() string
type CniCmdResponse ¶
type CniCmdResponse struct { CniResult []byte `protobuf:"bytes,1,opt,name=cni_result,json=cniResult,proto3" json:"cni_result,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*CniCmdResponse) Descriptor
deprecated
func (*CniCmdResponse) Descriptor() ([]byte, []int)
Deprecated: Use CniCmdResponse.ProtoReflect.Descriptor instead.
func (*CniCmdResponse) GetCniResult ¶
func (x *CniCmdResponse) GetCniResult() []byte
func (*CniCmdResponse) GetError ¶
func (x *CniCmdResponse) GetError() *Error
func (*CniCmdResponse) ProtoMessage ¶
func (*CniCmdResponse) ProtoMessage()
func (*CniCmdResponse) ProtoReflect ¶ added in v1.4.0
func (x *CniCmdResponse) ProtoReflect() protoreflect.Message
func (*CniCmdResponse) Reset ¶
func (x *CniCmdResponse) Reset()
func (*CniCmdResponse) String ¶
func (x *CniCmdResponse) String() string
type CniServer ¶
type CniServer interface { CmdAdd(context.Context, *CniCmdRequest) (*CniCmdResponse, error) CmdCheck(context.Context, *CniCmdRequest) (*CniCmdResponse, error) CmdDel(context.Context, *CniCmdRequest) (*CniCmdResponse, error) }
CniServer is the server API for Cni service.
type Error ¶
type Error struct { Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=antrea_io.antrea.pkg.apis.cni.v1beta1.ErrorCode" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Details []*any.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetDetails ¶
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶ added in v1.4.0
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorCode ¶
type ErrorCode int32
const ( ErrorCode_UNKNOWN ErrorCode = 0 ErrorCode_INCOMPATIBLE_CNI_VERSION ErrorCode = 1 ErrorCode_UNSUPPORTED_FIELD ErrorCode = 2 ErrorCode_UNKNOWN_CONTAINER ErrorCode = 3 ErrorCode_INVALID_ENVIRONMENT_VARIABLES ErrorCode = 4 ErrorCode_IO_FAILURE ErrorCode = 5 ErrorCode_DECODING_FAILURE ErrorCode = 6 ErrorCode_INVALID_NETWORK_CONFIG ErrorCode = 7 ErrorCode_TRY_AGAIN_LATER ErrorCode = 11 ErrorCode_IPAM_FAILURE ErrorCode = 101 ErrorCode_CONFIG_INTERFACE_FAILURE ErrorCode = 102 ErrorCode_CHECK_INTERFACE_FAILURE ErrorCode = 103 // these errors are not used by the servers, but we declare them here to // make sure they are reserved. ErrorCode_UNKNOWN_RPC_ERROR ErrorCode = 201 ErrorCode_INCOMPATIBLE_API_VERSION ErrorCode = 202 )
func (ErrorCode) Descriptor ¶ added in v1.4.0
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶ added in v1.4.0
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶ added in v1.4.0
func (ErrorCode) Type() protoreflect.EnumType
type UnimplementedCniServer ¶
type UnimplementedCniServer struct { }
UnimplementedCniServer can be embedded to have forward compatible implementations.
func (*UnimplementedCniServer) CmdAdd ¶
func (*UnimplementedCniServer) CmdAdd(context.Context, *CniCmdRequest) (*CniCmdResponse, error)
func (*UnimplementedCniServer) CmdCheck ¶
func (*UnimplementedCniServer) CmdCheck(context.Context, *CniCmdRequest) (*CniCmdResponse, error)
func (*UnimplementedCniServer) CmdDel ¶
func (*UnimplementedCniServer) CmdDel(context.Context, *CniCmdRequest) (*CniCmdResponse, error)
Click to show internal directories.
Click to hide internal directories.