v1alpha

package
v1.6.13 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CNS_SetOrchestratorInfo_FullMethodName = "/cns.CNS/SetOrchestratorInfo"
	CNS_GetNodeInfo_FullMethodName         = "/cns.CNS/GetNodeInfo"
)

Variables

View Source
var CNS_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cns.CNS",
	HandlerType: (*CNSServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetOrchestratorInfo",
			Handler:    _CNS_SetOrchestratorInfo_Handler,
		},
		{
			MethodName: "GetNodeInfo",
			Handler:    _CNS_GetNodeInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cns/grpc/proto/server.proto",
}

CNS_ServiceDesc is the grpc.ServiceDesc for CNS service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_cns_grpc_proto_server_proto protoreflect.FileDescriptor

Functions

func RegisterCNSServer

func RegisterCNSServer(s grpc.ServiceRegistrar, srv CNSServer)

Types

type CNSClient

type CNSClient interface {
	// Sets the orchestrator information for a node.
	SetOrchestratorInfo(ctx context.Context, in *SetOrchestratorInfoRequest, opts ...grpc.CallOption) (*SetOrchestratorInfoResponse, error)
	// Retrieves detailed information about a specific node.
	// Primarily used for health checks.
	GetNodeInfo(ctx context.Context, in *NodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error)
}

CNSClient is the client API for CNS 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 NewCNSClient

func NewCNSClient(cc grpc.ClientConnInterface) CNSClient

type CNSServer

type CNSServer interface {
	// Sets the orchestrator information for a node.
	SetOrchestratorInfo(context.Context, *SetOrchestratorInfoRequest) (*SetOrchestratorInfoResponse, error)
	// Retrieves detailed information about a specific node.
	// Primarily used for health checks.
	GetNodeInfo(context.Context, *NodeInfoRequest) (*NodeInfoResponse, error)
	// contains filtered or unexported methods
}

CNSServer is the server API for CNS service. All implementations must embed UnimplementedCNSServer for forward compatibility

type NodeInfoRequest

type NodeInfoRequest struct {
	NodeID string `protobuf:"bytes,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"` // The node ID to identify the specific node.
	// contains filtered or unexported fields
}

NodeInfoRequest is the request message for retrieving detailed information about a specific node.

func (*NodeInfoRequest) Descriptor deprecated

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

Deprecated: Use NodeInfoRequest.ProtoReflect.Descriptor instead.

func (*NodeInfoRequest) GetNodeID

func (x *NodeInfoRequest) GetNodeID() string

func (*NodeInfoRequest) ProtoMessage

func (*NodeInfoRequest) ProtoMessage()

func (*NodeInfoRequest) ProtoReflect

func (x *NodeInfoRequest) ProtoReflect() protoreflect.Message

func (*NodeInfoRequest) Reset

func (x *NodeInfoRequest) Reset()

func (*NodeInfoRequest) String

func (x *NodeInfoRequest) String() string

type NodeInfoResponse

type NodeInfoResponse struct {
	NodeID    string `protobuf:"bytes,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"`        // The node ID.
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`            // The name of the node.
	Ip        string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`                // The IP address of the node.
	IsHealthy bool   `protobuf:"varint,4,opt,name=isHealthy,proto3" json:"isHealthy,omitempty"` // Indicates whether the node is healthy or not.
	Status    string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`        // The current status of the node (e.g., running, stopped).
	Message   string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"`      // Additional information about the node's health or status.
	// contains filtered or unexported fields
}

NodeInfoResponse is the response message containing detailed information about a specific node.

func (*NodeInfoResponse) Descriptor deprecated

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

Deprecated: Use NodeInfoResponse.ProtoReflect.Descriptor instead.

func (*NodeInfoResponse) GetIp

func (x *NodeInfoResponse) GetIp() string

func (*NodeInfoResponse) GetIsHealthy

func (x *NodeInfoResponse) GetIsHealthy() bool

func (*NodeInfoResponse) GetMessage

func (x *NodeInfoResponse) GetMessage() string

func (*NodeInfoResponse) GetName

func (x *NodeInfoResponse) GetName() string

func (*NodeInfoResponse) GetNodeID

func (x *NodeInfoResponse) GetNodeID() string

func (*NodeInfoResponse) GetStatus

func (x *NodeInfoResponse) GetStatus() string

func (*NodeInfoResponse) ProtoMessage

func (*NodeInfoResponse) ProtoMessage()

func (*NodeInfoResponse) ProtoReflect

func (x *NodeInfoResponse) ProtoReflect() protoreflect.Message

func (*NodeInfoResponse) Reset

func (x *NodeInfoResponse) Reset()

func (*NodeInfoResponse) String

func (x *NodeInfoResponse) String() string

type SetOrchestratorInfoRequest

type SetOrchestratorInfoRequest struct {
	DncPartitionKey  string `protobuf:"bytes,1,opt,name=dncPartitionKey,proto3" json:"dncPartitionKey,omitempty"`   // The partition key for DNC.
	NodeID           string `protobuf:"bytes,2,opt,name=nodeID,proto3" json:"nodeID,omitempty"`                     // The node ID.
	OrchestratorType string `protobuf:"bytes,3,opt,name=orchestratorType,proto3" json:"orchestratorType,omitempty"` // The type of the orchestrator.
	// contains filtered or unexported fields
}

SetOrchestratorInfoRequest is the request message for setting the orchestrator information.

func (*SetOrchestratorInfoRequest) Descriptor deprecated

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

Deprecated: Use SetOrchestratorInfoRequest.ProtoReflect.Descriptor instead.

func (*SetOrchestratorInfoRequest) GetDncPartitionKey

func (x *SetOrchestratorInfoRequest) GetDncPartitionKey() string

func (*SetOrchestratorInfoRequest) GetNodeID

func (x *SetOrchestratorInfoRequest) GetNodeID() string

func (*SetOrchestratorInfoRequest) GetOrchestratorType

func (x *SetOrchestratorInfoRequest) GetOrchestratorType() string

func (*SetOrchestratorInfoRequest) ProtoMessage

func (*SetOrchestratorInfoRequest) ProtoMessage()

func (*SetOrchestratorInfoRequest) ProtoReflect

func (*SetOrchestratorInfoRequest) Reset

func (x *SetOrchestratorInfoRequest) Reset()

func (*SetOrchestratorInfoRequest) String

func (x *SetOrchestratorInfoRequest) String() string

type SetOrchestratorInfoResponse

type SetOrchestratorInfoResponse struct {
	// contains filtered or unexported fields
}

SetOrchestratorInfoResponse is the response message for setting the orchestrator information.

func (*SetOrchestratorInfoResponse) Descriptor deprecated

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

Deprecated: Use SetOrchestratorInfoResponse.ProtoReflect.Descriptor instead.

func (*SetOrchestratorInfoResponse) ProtoMessage

func (*SetOrchestratorInfoResponse) ProtoMessage()

func (*SetOrchestratorInfoResponse) ProtoReflect

func (*SetOrchestratorInfoResponse) Reset

func (x *SetOrchestratorInfoResponse) Reset()

func (*SetOrchestratorInfoResponse) String

func (x *SetOrchestratorInfoResponse) String() string

type UnimplementedCNSServer

type UnimplementedCNSServer struct {
}

UnimplementedCNSServer must be embedded to have forward compatible implementations.

func (UnimplementedCNSServer) GetNodeInfo

type UnsafeCNSServer

type UnsafeCNSServer interface {
	// contains filtered or unexported methods
}

UnsafeCNSServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CNSServer will result in compilation errors.

Jump to

Keyboard shortcuts

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