Documentation ¶
Index ¶
- Variables
- func RegisterCniServer(s *grpc.Server, srv CniServer)
- type CniClient
- type CniCmdArgs
- func (*CniCmdArgs) Descriptor() ([]byte, []int)
- func (m *CniCmdArgs) GetArgs() string
- func (m *CniCmdArgs) GetContainerId() string
- func (m *CniCmdArgs) GetIfname() string
- func (m *CniCmdArgs) GetNetns() string
- func (m *CniCmdArgs) GetNetworkConfiguration() []byte
- func (m *CniCmdArgs) GetPath() string
- func (*CniCmdArgs) ProtoMessage()
- func (m *CniCmdArgs) Reset()
- func (m *CniCmdArgs) String() string
- func (m *CniCmdArgs) XXX_DiscardUnknown()
- func (m *CniCmdArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CniCmdArgs) XXX_Merge(src proto.Message)
- func (m *CniCmdArgs) XXX_Size() int
- func (m *CniCmdArgs) XXX_Unmarshal(b []byte) error
- type CniCmdRequest
- func (*CniCmdRequest) Descriptor() ([]byte, []int)
- func (m *CniCmdRequest) GetCniArgs() *CniCmdArgs
- func (*CniCmdRequest) ProtoMessage()
- func (m *CniCmdRequest) Reset()
- func (m *CniCmdRequest) String() string
- func (m *CniCmdRequest) XXX_DiscardUnknown()
- func (m *CniCmdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CniCmdRequest) XXX_Merge(src proto.Message)
- func (m *CniCmdRequest) XXX_Size() int
- func (m *CniCmdRequest) XXX_Unmarshal(b []byte) error
- type CniCmdResponse
- func (*CniCmdResponse) Descriptor() ([]byte, []int)
- func (m *CniCmdResponse) GetCniResult() []byte
- func (m *CniCmdResponse) GetError() *Error
- func (*CniCmdResponse) ProtoMessage()
- func (m *CniCmdResponse) Reset()
- func (m *CniCmdResponse) String() string
- func (m *CniCmdResponse) XXX_DiscardUnknown()
- func (m *CniCmdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CniCmdResponse) XXX_Merge(src proto.Message)
- func (m *CniCmdResponse) XXX_Size() int
- func (m *CniCmdResponse) XXX_Unmarshal(b []byte) error
- type CniServer
- type Error
- func (*Error) Descriptor() ([]byte, []int)
- func (m *Error) GetCode() ErrorCode
- func (m *Error) GetDetails() []*any.Any
- func (m *Error) GetMessage() string
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) String() string
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
- type ErrorCode
- type UnimplementedCniServer
- func (*UnimplementedCniServer) CmdAdd(ctx context.Context, req *CniCmdRequest) (*CniCmdResponse, error)
- func (*UnimplementedCniServer) CmdCheck(ctx context.Context, req *CniCmdRequest) (*CniCmdResponse, error)
- func (*UnimplementedCniServer) CmdDel(ctx context.Context, req *CniCmdRequest) (*CniCmdResponse, error)
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",
}
View Source
var 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,
}
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.ClientConn) 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CniCmdArgs) Descriptor ¶
func (*CniCmdArgs) Descriptor() ([]byte, []int)
func (*CniCmdArgs) GetArgs ¶
func (m *CniCmdArgs) GetArgs() string
func (*CniCmdArgs) GetContainerId ¶
func (m *CniCmdArgs) GetContainerId() string
func (*CniCmdArgs) GetIfname ¶
func (m *CniCmdArgs) GetIfname() string
func (*CniCmdArgs) GetNetns ¶
func (m *CniCmdArgs) GetNetns() string
func (*CniCmdArgs) GetNetworkConfiguration ¶
func (m *CniCmdArgs) GetNetworkConfiguration() []byte
func (*CniCmdArgs) GetPath ¶
func (m *CniCmdArgs) GetPath() string
func (*CniCmdArgs) ProtoMessage ¶
func (*CniCmdArgs) ProtoMessage()
func (*CniCmdArgs) Reset ¶
func (m *CniCmdArgs) Reset()
func (*CniCmdArgs) String ¶
func (m *CniCmdArgs) String() string
func (*CniCmdArgs) XXX_DiscardUnknown ¶
func (m *CniCmdArgs) XXX_DiscardUnknown()
func (*CniCmdArgs) XXX_Marshal ¶
func (m *CniCmdArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CniCmdArgs) XXX_Merge ¶
func (m *CniCmdArgs) XXX_Merge(src proto.Message)
func (*CniCmdArgs) XXX_Size ¶
func (m *CniCmdArgs) XXX_Size() int
func (*CniCmdArgs) XXX_Unmarshal ¶
func (m *CniCmdArgs) XXX_Unmarshal(b []byte) error
type CniCmdRequest ¶
type CniCmdRequest struct { CniArgs *CniCmdArgs `protobuf:"bytes,1,opt,name=cni_args,json=cniArgs,proto3" json:"cni_args,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CniCmdRequest) Descriptor ¶
func (*CniCmdRequest) Descriptor() ([]byte, []int)
func (*CniCmdRequest) GetCniArgs ¶
func (m *CniCmdRequest) GetCniArgs() *CniCmdArgs
func (*CniCmdRequest) ProtoMessage ¶
func (*CniCmdRequest) ProtoMessage()
func (*CniCmdRequest) Reset ¶
func (m *CniCmdRequest) Reset()
func (*CniCmdRequest) String ¶
func (m *CniCmdRequest) String() string
func (*CniCmdRequest) XXX_DiscardUnknown ¶
func (m *CniCmdRequest) XXX_DiscardUnknown()
func (*CniCmdRequest) XXX_Marshal ¶
func (m *CniCmdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CniCmdRequest) XXX_Merge ¶
func (m *CniCmdRequest) XXX_Merge(src proto.Message)
func (*CniCmdRequest) XXX_Size ¶
func (m *CniCmdRequest) XXX_Size() int
func (*CniCmdRequest) XXX_Unmarshal ¶
func (m *CniCmdRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CniCmdResponse) Descriptor ¶
func (*CniCmdResponse) Descriptor() ([]byte, []int)
func (*CniCmdResponse) GetCniResult ¶
func (m *CniCmdResponse) GetCniResult() []byte
func (*CniCmdResponse) GetError ¶
func (m *CniCmdResponse) GetError() *Error
func (*CniCmdResponse) ProtoMessage ¶
func (*CniCmdResponse) ProtoMessage()
func (*CniCmdResponse) Reset ¶
func (m *CniCmdResponse) Reset()
func (*CniCmdResponse) String ¶
func (m *CniCmdResponse) String() string
func (*CniCmdResponse) XXX_DiscardUnknown ¶
func (m *CniCmdResponse) XXX_DiscardUnknown()
func (*CniCmdResponse) XXX_Marshal ¶
func (m *CniCmdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CniCmdResponse) XXX_Merge ¶
func (m *CniCmdResponse) XXX_Merge(src proto.Message)
func (*CniCmdResponse) XXX_Size ¶
func (m *CniCmdResponse) XXX_Size() int
func (*CniCmdResponse) XXX_Unmarshal ¶
func (m *CniCmdResponse) XXX_Unmarshal(b []byte) error
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 `` /* 129-byte string literal not displayed */ 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Error) Descriptor ¶
func (*Error) GetDetails ¶
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
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) EnumDescriptor ¶
type UnimplementedCniServer ¶
type UnimplementedCniServer struct { }
UnimplementedCniServer can be embedded to have forward compatible implementations.
func (*UnimplementedCniServer) CmdAdd ¶
func (*UnimplementedCniServer) CmdAdd(ctx context.Context, req *CniCmdRequest) (*CniCmdResponse, error)
func (*UnimplementedCniServer) CmdCheck ¶
func (*UnimplementedCniServer) CmdCheck(ctx context.Context, req *CniCmdRequest) (*CniCmdResponse, error)
func (*UnimplementedCniServer) CmdDel ¶
func (*UnimplementedCniServer) CmdDel(ctx context.Context, req *CniCmdRequest) (*CniCmdResponse, error)
Click to show internal directories.
Click to hide internal directories.