Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNodeAgentServer(s grpc.ServiceRegistrar, srv NodeAgentServer)
- type GetPodAnnotationRequest
- func (*GetPodAnnotationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPodAnnotationRequest) GetKey() string
- func (x *GetPodAnnotationRequest) GetName() string
- func (x *GetPodAnnotationRequest) GetNamespace() string
- func (*GetPodAnnotationRequest) ProtoMessage()
- func (x *GetPodAnnotationRequest) ProtoReflect() protoreflect.Message
- func (x *GetPodAnnotationRequest) Reset()
- func (x *GetPodAnnotationRequest) String() string
- type GetPodAnnotationResponse
- func (*GetPodAnnotationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPodAnnotationResponse) GetFound() bool
- func (x *GetPodAnnotationResponse) GetValue() string
- func (*GetPodAnnotationResponse) ProtoMessage()
- func (x *GetPodAnnotationResponse) ProtoReflect() protoreflect.Message
- func (x *GetPodAnnotationResponse) Reset()
- func (x *GetPodAnnotationResponse) String() string
- type NodeAgentClient
- type NodeAgentServer
- type SetupNetworksRequest
- func (*SetupNetworksRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetupNetworksRequest) GetName() string
- func (x *SetupNetworksRequest) GetNamespace() string
- func (x *SetupNetworksRequest) GetNetnsPath() string
- func (x *SetupNetworksRequest) GetPodUid() string
- func (*SetupNetworksRequest) ProtoMessage()
- func (x *SetupNetworksRequest) ProtoReflect() protoreflect.Message
- func (x *SetupNetworksRequest) Reset()
- func (x *SetupNetworksRequest) String() string
- type SetupNetworksResponse
- func (*SetupNetworksResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetupNetworksResponse) GetDefaultNetwork() string
- func (*SetupNetworksResponse) ProtoMessage()
- func (x *SetupNetworksResponse) ProtoReflect() protoreflect.Message
- func (x *SetupNetworksResponse) Reset()
- func (x *SetupNetworksResponse) String() string
- type UnimplementedNodeAgentServer
- type UnsafeNodeAgentServer
Constants ¶
const ( NodeAgent_SetupNetworks_FullMethodName = "/node.v1.NodeAgent/SetupNetworks" NodeAgent_GetPodAnnotation_FullMethodName = "/node.v1.NodeAgent/GetPodAnnotation" )
Variables ¶
var File_node_agent_proto protoreflect.FileDescriptor
var NodeAgent_ServiceDesc = grpc.ServiceDesc{ ServiceName: "node.v1.NodeAgent", HandlerType: (*NodeAgentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetupNetworks", Handler: _NodeAgent_SetupNetworks_Handler, }, { MethodName: "GetPodAnnotation", Handler: _NodeAgent_GetPodAnnotation_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "node_agent.proto", }
NodeAgent_ServiceDesc is the grpc.ServiceDesc for NodeAgent service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNodeAgentServer ¶
func RegisterNodeAgentServer(s grpc.ServiceRegistrar, srv NodeAgentServer)
Types ¶
type GetPodAnnotationRequest ¶
type GetPodAnnotationRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
func (*GetPodAnnotationRequest) Descriptor
deprecated
func (*GetPodAnnotationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPodAnnotationRequest.ProtoReflect.Descriptor instead.
func (*GetPodAnnotationRequest) GetKey ¶
func (x *GetPodAnnotationRequest) GetKey() string
func (*GetPodAnnotationRequest) GetName ¶
func (x *GetPodAnnotationRequest) GetName() string
func (*GetPodAnnotationRequest) GetNamespace ¶
func (x *GetPodAnnotationRequest) GetNamespace() string
func (*GetPodAnnotationRequest) ProtoMessage ¶
func (*GetPodAnnotationRequest) ProtoMessage()
func (*GetPodAnnotationRequest) ProtoReflect ¶
func (x *GetPodAnnotationRequest) ProtoReflect() protoreflect.Message
func (*GetPodAnnotationRequest) Reset ¶
func (x *GetPodAnnotationRequest) Reset()
func (*GetPodAnnotationRequest) String ¶
func (x *GetPodAnnotationRequest) String() string
type GetPodAnnotationResponse ¶
type GetPodAnnotationResponse struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"`
// contains filtered or unexported fields
}
func (*GetPodAnnotationResponse) Descriptor
deprecated
func (*GetPodAnnotationResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPodAnnotationResponse.ProtoReflect.Descriptor instead.
func (*GetPodAnnotationResponse) GetFound ¶
func (x *GetPodAnnotationResponse) GetFound() bool
func (*GetPodAnnotationResponse) GetValue ¶
func (x *GetPodAnnotationResponse) GetValue() string
func (*GetPodAnnotationResponse) ProtoMessage ¶
func (*GetPodAnnotationResponse) ProtoMessage()
func (*GetPodAnnotationResponse) ProtoReflect ¶
func (x *GetPodAnnotationResponse) ProtoReflect() protoreflect.Message
func (*GetPodAnnotationResponse) Reset ¶
func (x *GetPodAnnotationResponse) Reset()
func (*GetPodAnnotationResponse) String ¶
func (x *GetPodAnnotationResponse) String() string
type NodeAgentClient ¶
type NodeAgentClient interface {
// SetupNetworks is called by cni-gate during CNI ADD.
// It waits for pod annotations to appear in cache, creates OVS veth pairs for all
// interfaces in the networks annotation, moves pod-side vetches into the pod netns,
// and returns how cni-gate should handle the default k8s interface (eth0).
SetupNetworks(ctx context.Context, in *SetupNetworksRequest, opts ...grpc.CallOption) (*SetupNetworksResponse, error)
// GetPodAnnotation reads a single pod annotation; used by cni-gate during CNI DEL.
GetPodAnnotation(ctx context.Context, in *GetPodAnnotationRequest, opts ...grpc.CallOption) (*GetPodAnnotationResponse, error)
}
NodeAgentClient is the client API for NodeAgent 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 NewNodeAgentClient ¶
func NewNodeAgentClient(cc grpc.ClientConnInterface) NodeAgentClient
type NodeAgentServer ¶
type NodeAgentServer interface {
// SetupNetworks is called by cni-gate during CNI ADD.
// It waits for pod annotations to appear in cache, creates OVS veth pairs for all
// interfaces in the networks annotation, moves pod-side vetches into the pod netns,
// and returns how cni-gate should handle the default k8s interface (eth0).
SetupNetworks(context.Context, *SetupNetworksRequest) (*SetupNetworksResponse, error)
// GetPodAnnotation reads a single pod annotation; used by cni-gate during CNI DEL.
GetPodAnnotation(context.Context, *GetPodAnnotationRequest) (*GetPodAnnotationResponse, error)
// contains filtered or unexported methods
}
NodeAgentServer is the server API for NodeAgent service. All implementations must embed UnimplementedNodeAgentServer for forward compatibility.
type SetupNetworksRequest ¶
type SetupNetworksRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
PodUid string `protobuf:"bytes,3,opt,name=pod_uid,json=podUid,proto3" json:"pod_uid,omitempty"`
NetnsPath string `protobuf:"bytes,4,opt,name=netns_path,json=netnsPath,proto3" json:"netns_path,omitempty"`
// contains filtered or unexported fields
}
func (*SetupNetworksRequest) Descriptor
deprecated
func (*SetupNetworksRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetupNetworksRequest.ProtoReflect.Descriptor instead.
func (*SetupNetworksRequest) GetName ¶
func (x *SetupNetworksRequest) GetName() string
func (*SetupNetworksRequest) GetNamespace ¶
func (x *SetupNetworksRequest) GetNamespace() string
func (*SetupNetworksRequest) GetNetnsPath ¶
func (x *SetupNetworksRequest) GetNetnsPath() string
func (*SetupNetworksRequest) GetPodUid ¶
func (x *SetupNetworksRequest) GetPodUid() string
func (*SetupNetworksRequest) ProtoMessage ¶
func (*SetupNetworksRequest) ProtoMessage()
func (*SetupNetworksRequest) ProtoReflect ¶
func (x *SetupNetworksRequest) ProtoReflect() protoreflect.Message
func (*SetupNetworksRequest) Reset ¶
func (x *SetupNetworksRequest) Reset()
func (*SetupNetworksRequest) String ¶
func (x *SetupNetworksRequest) String() string
type SetupNetworksResponse ¶
type SetupNetworksResponse struct {
// How cni-gate should handle the default k8s interface (eth0).
// "real" — delegate to k8s CNI normally (no annotation or annotation == "eth0")
// "stub" — stub eth0 only; all OVS interfaces already wired
// other — access interface name; delegate k8s CNI to that iface + stub eth0
DefaultNetwork string `protobuf:"bytes,1,opt,name=default_network,json=defaultNetwork,proto3" json:"default_network,omitempty"`
// contains filtered or unexported fields
}
func (*SetupNetworksResponse) Descriptor
deprecated
func (*SetupNetworksResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetupNetworksResponse.ProtoReflect.Descriptor instead.
func (*SetupNetworksResponse) GetDefaultNetwork ¶
func (x *SetupNetworksResponse) GetDefaultNetwork() string
func (*SetupNetworksResponse) ProtoMessage ¶
func (*SetupNetworksResponse) ProtoMessage()
func (*SetupNetworksResponse) ProtoReflect ¶
func (x *SetupNetworksResponse) ProtoReflect() protoreflect.Message
func (*SetupNetworksResponse) Reset ¶
func (x *SetupNetworksResponse) Reset()
func (*SetupNetworksResponse) String ¶
func (x *SetupNetworksResponse) String() string
type UnimplementedNodeAgentServer ¶
type UnimplementedNodeAgentServer struct{}
UnimplementedNodeAgentServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNodeAgentServer) GetPodAnnotation ¶
func (UnimplementedNodeAgentServer) GetPodAnnotation(context.Context, *GetPodAnnotationRequest) (*GetPodAnnotationResponse, error)
func (UnimplementedNodeAgentServer) SetupNetworks ¶
func (UnimplementedNodeAgentServer) SetupNetworks(context.Context, *SetupNetworksRequest) (*SetupNetworksResponse, error)
type UnsafeNodeAgentServer ¶
type UnsafeNodeAgentServer interface {
// contains filtered or unexported methods
}
UnsafeNodeAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeAgentServer will result in compilation errors.