Documentation ¶
Index ¶
- Variables
- func RegisterRemoteCNIServer(s *grpc.Server, srv RemoteCNIServer)
- type CNIReply
- func (*CNIReply) Descriptor() ([]byte, []int)
- func (m *CNIReply) GetDns() []*CNIReply_DNS
- func (m *CNIReply) GetError() string
- func (m *CNIReply) GetInterfaces() []*CNIReply_Interface
- func (m *CNIReply) GetResult() uint32
- func (m *CNIReply) GetRoutes() []*CNIReply_Route
- func (*CNIReply) ProtoMessage()
- func (m *CNIReply) Reset()
- func (m *CNIReply) String() string
- func (m *CNIReply) XXX_DiscardUnknown()
- func (m *CNIReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CNIReply) XXX_Merge(src proto.Message)
- func (m *CNIReply) XXX_Size() int
- func (m *CNIReply) XXX_Unmarshal(b []byte) error
- type CNIReply_DNS
- func (*CNIReply_DNS) Descriptor() ([]byte, []int)
- func (m *CNIReply_DNS) GetDomain() string
- func (m *CNIReply_DNS) GetNameservers() []string
- func (m *CNIReply_DNS) GetOptions() []string
- func (m *CNIReply_DNS) GetSearch() []string
- func (*CNIReply_DNS) ProtoMessage()
- func (m *CNIReply_DNS) Reset()
- func (m *CNIReply_DNS) String() string
- func (m *CNIReply_DNS) XXX_DiscardUnknown()
- func (m *CNIReply_DNS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CNIReply_DNS) XXX_Merge(src proto.Message)
- func (m *CNIReply_DNS) XXX_Size() int
- func (m *CNIReply_DNS) XXX_Unmarshal(b []byte) error
- type CNIReply_Interface
- func (*CNIReply_Interface) Descriptor() ([]byte, []int)
- func (m *CNIReply_Interface) GetIpAddresses() []*CNIReply_Interface_IP
- func (m *CNIReply_Interface) GetMac() string
- func (m *CNIReply_Interface) GetName() string
- func (m *CNIReply_Interface) GetSandbox() string
- func (*CNIReply_Interface) ProtoMessage()
- func (m *CNIReply_Interface) Reset()
- func (m *CNIReply_Interface) String() string
- func (m *CNIReply_Interface) XXX_DiscardUnknown()
- func (m *CNIReply_Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CNIReply_Interface) XXX_Merge(src proto.Message)
- func (m *CNIReply_Interface) XXX_Size() int
- func (m *CNIReply_Interface) XXX_Unmarshal(b []byte) error
- type CNIReply_Interface_IP
- func (*CNIReply_Interface_IP) Descriptor() ([]byte, []int)
- func (m *CNIReply_Interface_IP) GetAddress() string
- func (m *CNIReply_Interface_IP) GetGateway() string
- func (m *CNIReply_Interface_IP) GetVersion() CNIReply_Interface_IP_Version
- func (*CNIReply_Interface_IP) ProtoMessage()
- func (m *CNIReply_Interface_IP) Reset()
- func (m *CNIReply_Interface_IP) String() string
- func (m *CNIReply_Interface_IP) XXX_DiscardUnknown()
- func (m *CNIReply_Interface_IP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CNIReply_Interface_IP) XXX_Merge(src proto.Message)
- func (m *CNIReply_Interface_IP) XXX_Size() int
- func (m *CNIReply_Interface_IP) XXX_Unmarshal(b []byte) error
- type CNIReply_Interface_IP_Version
- type CNIReply_Route
- func (*CNIReply_Route) Descriptor() ([]byte, []int)
- func (m *CNIReply_Route) GetDst() string
- func (m *CNIReply_Route) GetGw() string
- func (*CNIReply_Route) ProtoMessage()
- func (m *CNIReply_Route) Reset()
- func (m *CNIReply_Route) String() string
- func (m *CNIReply_Route) XXX_DiscardUnknown()
- func (m *CNIReply_Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CNIReply_Route) XXX_Merge(src proto.Message)
- func (m *CNIReply_Route) XXX_Size() int
- func (m *CNIReply_Route) XXX_Unmarshal(b []byte) error
- type CNIRequest
- func (*CNIRequest) Descriptor() ([]byte, []int)
- func (m *CNIRequest) GetContainerId() string
- func (m *CNIRequest) GetExtraArguments() string
- func (m *CNIRequest) GetExtraNwConfig() string
- func (m *CNIRequest) GetInterfaceName() string
- func (m *CNIRequest) GetNetworkNamespace() string
- func (m *CNIRequest) GetVersion() string
- func (*CNIRequest) ProtoMessage()
- func (m *CNIRequest) Reset()
- func (m *CNIRequest) String() string
- func (m *CNIRequest) XXX_DiscardUnknown()
- func (m *CNIRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *CNIRequest) XXX_Merge(src proto.Message)
- func (m *CNIRequest) XXX_Size() int
- func (m *CNIRequest) XXX_Unmarshal(b []byte) error
- type RemoteCNIClient
- type RemoteCNIServer
Constants ¶
This section is empty.
Variables ¶
var CNIReply_Interface_IP_Version_name = map[int32]string{
0: "IPV4",
1: "IPV6",
}
var CNIReply_Interface_IP_Version_value = map[string]int32{
"IPV4": 0,
"IPV6": 1,
}
Functions ¶
func RegisterRemoteCNIServer ¶
func RegisterRemoteCNIServer(s *grpc.Server, srv RemoteCNIServer)
Types ¶
type CNIReply ¶
type CNIReply struct { // Result code. 0 = success, non-zero = error. Result uint32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // Error string in case that result != 0. Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // List of interfaces connected to the container. Interfaces []*CNIReply_Interface `protobuf:"bytes,4,rep,name=interfaces" json:"interfaces,omitempty"` // List of routes configured in the container. Routes []*CNIReply_Route `protobuf:"bytes,5,rep,name=routes" json:"routes,omitempty"` // DNS entries. Repeated only because it is optional, normally there should be only one dns member. Dns []*CNIReply_DNS `protobuf:"bytes,6,rep,name=dns" json:"dns,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response to the CNIRequest. Corresponds to the CNI specification at https://github.com/containernetworking/cni/blob/master/SPEC.md#parameters
func (*CNIReply) Descriptor ¶
func (*CNIReply) GetDns ¶
func (m *CNIReply) GetDns() []*CNIReply_DNS
func (*CNIReply) GetInterfaces ¶
func (m *CNIReply) GetInterfaces() []*CNIReply_Interface
func (*CNIReply) GetRoutes ¶
func (m *CNIReply) GetRoutes() []*CNIReply_Route
func (*CNIReply) ProtoMessage ¶
func (*CNIReply) ProtoMessage()
func (*CNIReply) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *CNIReply) XXX_DiscardUnknown()
func (*CNIReply) XXX_Marshal ¶ added in v1.4.0
func (*CNIReply) XXX_Unmarshal ¶ added in v1.4.0
type CNIReply_DNS ¶
type CNIReply_DNS struct { // The local domain used for short hostname lookups. Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // List of a priority-ordered list of DNS nameservers that this network is aware of. Nameservers []string `protobuf:"bytes,2,rep,name=nameservers" json:"nameservers,omitempty"` // List of priority ordered search domains for short hostname lookups. Will be preferred over domain by most resolvers. Search []string `protobuf:"bytes,3,rep,name=search" json:"search,omitempty"` // Listt of options that can be passed to the resolver. Options []string `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
DNS details, as described in https://github.com/containernetworking/cni/blob/master/SPEC.md#dns
func (*CNIReply_DNS) Descriptor ¶
func (*CNIReply_DNS) Descriptor() ([]byte, []int)
func (*CNIReply_DNS) GetDomain ¶
func (m *CNIReply_DNS) GetDomain() string
func (*CNIReply_DNS) GetNameservers ¶
func (m *CNIReply_DNS) GetNameservers() []string
func (*CNIReply_DNS) GetOptions ¶
func (m *CNIReply_DNS) GetOptions() []string
func (*CNIReply_DNS) GetSearch ¶
func (m *CNIReply_DNS) GetSearch() []string
func (*CNIReply_DNS) ProtoMessage ¶
func (*CNIReply_DNS) ProtoMessage()
func (*CNIReply_DNS) Reset ¶
func (m *CNIReply_DNS) Reset()
func (*CNIReply_DNS) String ¶
func (m *CNIReply_DNS) String() string
func (*CNIReply_DNS) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *CNIReply_DNS) XXX_DiscardUnknown()
func (*CNIReply_DNS) XXX_Marshal ¶ added in v1.4.0
func (m *CNIReply_DNS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNIReply_DNS) XXX_Merge ¶ added in v1.4.0
func (dst *CNIReply_DNS) XXX_Merge(src proto.Message)
func (*CNIReply_DNS) XXX_Size ¶ added in v1.4.0
func (m *CNIReply_DNS) XXX_Size() int
func (*CNIReply_DNS) XXX_Unmarshal ¶ added in v1.4.0
func (m *CNIReply_DNS) XXX_Unmarshal(b []byte) error
type CNIReply_Interface ¶
type CNIReply_Interface struct { // Name if the interface. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // MAC address of the interface. Mac string `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"` // Details about the sandbox (if any) the interface is in. Can be a netns path, empty/omitted for host interfaces. Sandbox string `protobuf:"bytes,3,opt,name=sandbox,proto3" json:"sandbox,omitempty"` // List of IP addressess applied on the interface. IpAddresses []*CNIReply_Interface_IP `protobuf:"bytes,4,rep,name=ip_addresses,json=ipAddresses" json:"ip_addresses,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Interface details, as described in https://github.com/containernetworking/cni/blob/master/SPEC.md#result
func (*CNIReply_Interface) Descriptor ¶
func (*CNIReply_Interface) Descriptor() ([]byte, []int)
func (*CNIReply_Interface) GetIpAddresses ¶
func (m *CNIReply_Interface) GetIpAddresses() []*CNIReply_Interface_IP
func (*CNIReply_Interface) GetMac ¶
func (m *CNIReply_Interface) GetMac() string
func (*CNIReply_Interface) GetName ¶
func (m *CNIReply_Interface) GetName() string
func (*CNIReply_Interface) GetSandbox ¶
func (m *CNIReply_Interface) GetSandbox() string
func (*CNIReply_Interface) ProtoMessage ¶
func (*CNIReply_Interface) ProtoMessage()
func (*CNIReply_Interface) Reset ¶
func (m *CNIReply_Interface) Reset()
func (*CNIReply_Interface) String ¶
func (m *CNIReply_Interface) String() string
func (*CNIReply_Interface) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *CNIReply_Interface) XXX_DiscardUnknown()
func (*CNIReply_Interface) XXX_Marshal ¶ added in v1.4.0
func (m *CNIReply_Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNIReply_Interface) XXX_Merge ¶ added in v1.4.0
func (dst *CNIReply_Interface) XXX_Merge(src proto.Message)
func (*CNIReply_Interface) XXX_Size ¶ added in v1.4.0
func (m *CNIReply_Interface) XXX_Size() int
func (*CNIReply_Interface) XXX_Unmarshal ¶ added in v1.4.0
func (m *CNIReply_Interface) XXX_Unmarshal(b []byte) error
type CNIReply_Interface_IP ¶
type CNIReply_Interface_IP struct { // IP version. Version CNIReply_Interface_IP_Version `protobuf:"varint,1,opt,name=version,proto3,enum=cni.CNIReply_Interface_IP_Version" json:"version,omitempty"` // IP address in CIDR notation (eg "192.168.1.3/24"). Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // The default gateway for this subnet, if one exists. Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
IP address details, as described in https://github.com/containernetworking/cni/blob/master/SPEC.md#ips
func (*CNIReply_Interface_IP) Descriptor ¶
func (*CNIReply_Interface_IP) Descriptor() ([]byte, []int)
func (*CNIReply_Interface_IP) GetAddress ¶
func (m *CNIReply_Interface_IP) GetAddress() string
func (*CNIReply_Interface_IP) GetGateway ¶
func (m *CNIReply_Interface_IP) GetGateway() string
func (*CNIReply_Interface_IP) GetVersion ¶
func (m *CNIReply_Interface_IP) GetVersion() CNIReply_Interface_IP_Version
func (*CNIReply_Interface_IP) ProtoMessage ¶
func (*CNIReply_Interface_IP) ProtoMessage()
func (*CNIReply_Interface_IP) Reset ¶
func (m *CNIReply_Interface_IP) Reset()
func (*CNIReply_Interface_IP) String ¶
func (m *CNIReply_Interface_IP) String() string
func (*CNIReply_Interface_IP) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *CNIReply_Interface_IP) XXX_DiscardUnknown()
func (*CNIReply_Interface_IP) XXX_Marshal ¶ added in v1.4.0
func (m *CNIReply_Interface_IP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNIReply_Interface_IP) XXX_Merge ¶ added in v1.4.0
func (dst *CNIReply_Interface_IP) XXX_Merge(src proto.Message)
func (*CNIReply_Interface_IP) XXX_Size ¶ added in v1.4.0
func (m *CNIReply_Interface_IP) XXX_Size() int
func (*CNIReply_Interface_IP) XXX_Unmarshal ¶ added in v1.4.0
func (m *CNIReply_Interface_IP) XXX_Unmarshal(b []byte) error
type CNIReply_Interface_IP_Version ¶
type CNIReply_Interface_IP_Version int32
const ( CNIReply_Interface_IP_IPV4 CNIReply_Interface_IP_Version = 0 CNIReply_Interface_IP_IPV6 CNIReply_Interface_IP_Version = 1 )
func (CNIReply_Interface_IP_Version) EnumDescriptor ¶
func (CNIReply_Interface_IP_Version) EnumDescriptor() ([]byte, []int)
func (CNIReply_Interface_IP_Version) String ¶
func (x CNIReply_Interface_IP_Version) String() string
type CNIReply_Route ¶
type CNIReply_Route struct { // Destination subnet specified in CIDR notation. Dst string `protobuf:"bytes,1,opt,name=dst,proto3" json:"dst,omitempty"` // IP of the gateway. If omitted, a default gateway is assumed. Gw string `protobuf:"bytes,2,opt,name=gw,proto3" json:"gw,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Route detials, as described in https://github.com/containernetworking/cni/blob/master/SPEC.md#routes
func (*CNIReply_Route) Descriptor ¶
func (*CNIReply_Route) Descriptor() ([]byte, []int)
func (*CNIReply_Route) GetDst ¶
func (m *CNIReply_Route) GetDst() string
func (*CNIReply_Route) GetGw ¶
func (m *CNIReply_Route) GetGw() string
func (*CNIReply_Route) ProtoMessage ¶
func (*CNIReply_Route) ProtoMessage()
func (*CNIReply_Route) Reset ¶
func (m *CNIReply_Route) Reset()
func (*CNIReply_Route) String ¶
func (m *CNIReply_Route) String() string
func (*CNIReply_Route) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *CNIReply_Route) XXX_DiscardUnknown()
func (*CNIReply_Route) XXX_Marshal ¶ added in v1.4.0
func (m *CNIReply_Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNIReply_Route) XXX_Merge ¶ added in v1.4.0
func (dst *CNIReply_Route) XXX_Merge(src proto.Message)
func (*CNIReply_Route) XXX_Size ¶ added in v1.4.0
func (m *CNIReply_Route) XXX_Size() int
func (*CNIReply_Route) XXX_Unmarshal ¶ added in v1.4.0
func (m *CNIReply_Route) XXX_Unmarshal(b []byte) error
type CNIRequest ¶
type CNIRequest struct { // The version of CNI spec that the caller is using (container management system or the invoking plugin). Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Container ID unique across an administrative domain while the container is live. ContainerId string `protobuf:"bytes,2,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // Path to the network namespace to be added, i.e. /proc/[pid]/ns/net or a bind-mount/link to it. NetworkNamespace string `protobuf:"bytes,3,opt,name=network_namespace,json=networkNamespace,proto3" json:"network_namespace,omitempty"` // Name of the interface inside the container. This is the name that should be assigned to the interface created inside the container (network namespace); consequently it must comply with the standard Linux restrictions on interface names. InterfaceName string `protobuf:"bytes,4,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"` // Network configuration. This is a JSON document describing a network to which a container can be joined. Optional. ExtraNwConfig string `protobuf:"bytes,5,opt,name=extra_nw_config,json=extraNwConfig,proto3" json:"extra_nw_config,omitempty"` // Extra arguments passed to CNI plugin. Optional. ExtraArguments string `protobuf:"bytes,6,opt,name=extra_arguments,json=extraArguments,proto3" json:"extra_arguments,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request to add a container to network. Corresponds to the CNI specification at https://github.com/containernetworking/cni/blob/master/SPEC.md#parameters
func (*CNIRequest) Descriptor ¶
func (*CNIRequest) Descriptor() ([]byte, []int)
func (*CNIRequest) GetContainerId ¶
func (m *CNIRequest) GetContainerId() string
func (*CNIRequest) GetExtraArguments ¶
func (m *CNIRequest) GetExtraArguments() string
func (*CNIRequest) GetExtraNwConfig ¶
func (m *CNIRequest) GetExtraNwConfig() string
func (*CNIRequest) GetInterfaceName ¶
func (m *CNIRequest) GetInterfaceName() string
func (*CNIRequest) GetNetworkNamespace ¶
func (m *CNIRequest) GetNetworkNamespace() string
func (*CNIRequest) GetVersion ¶
func (m *CNIRequest) GetVersion() string
func (*CNIRequest) ProtoMessage ¶
func (*CNIRequest) ProtoMessage()
func (*CNIRequest) Reset ¶
func (m *CNIRequest) Reset()
func (*CNIRequest) String ¶
func (m *CNIRequest) String() string
func (*CNIRequest) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *CNIRequest) XXX_DiscardUnknown()
func (*CNIRequest) XXX_Marshal ¶ added in v1.4.0
func (m *CNIRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNIRequest) XXX_Merge ¶ added in v1.4.0
func (dst *CNIRequest) XXX_Merge(src proto.Message)
func (*CNIRequest) XXX_Size ¶ added in v1.4.0
func (m *CNIRequest) XXX_Size() int
func (*CNIRequest) XXX_Unmarshal ¶ added in v1.4.0
func (m *CNIRequest) XXX_Unmarshal(b []byte) error
type RemoteCNIClient ¶
type RemoteCNIClient interface { // The request to add a container to network. Add(ctx context.Context, in *CNIRequest, opts ...grpc.CallOption) (*CNIReply, error) // The request to delete a container from network. Delete(ctx context.Context, in *CNIRequest, opts ...grpc.CallOption) (*CNIReply, error) }
func NewRemoteCNIClient ¶
func NewRemoteCNIClient(cc *grpc.ClientConn) RemoteCNIClient
type RemoteCNIServer ¶
type RemoteCNIServer interface { // The request to add a container to network. Add(context.Context, *CNIRequest) (*CNIReply, error) // The request to delete a container from network. Delete(context.Context, *CNIRequest) (*CNIReply, error) }