Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
- type AgentServiceClient
- type AgentServiceServer
- type PowerOffClusterRequest
- func (*PowerOffClusterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PowerOffClusterRequest) GetAccountName() string
- func (x *PowerOffClusterRequest) GetClusterId() string
- func (x *PowerOffClusterRequest) GetInstancesIdList() []string
- func (x *PowerOffClusterRequest) GetRegion() string
- func (*PowerOffClusterRequest) ProtoMessage()
- func (x *PowerOffClusterRequest) ProtoReflect() protoreflect.Message
- func (x *PowerOffClusterRequest) Reset()
- func (x *PowerOffClusterRequest) String() string
- type PowerOffClusterResponse
- func (*PowerOffClusterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PowerOffClusterResponse) GetError() int32
- func (x *PowerOffClusterResponse) GetMessage() string
- func (*PowerOffClusterResponse) ProtoMessage()
- func (x *PowerOffClusterResponse) ProtoReflect() protoreflect.Message
- func (x *PowerOffClusterResponse) Reset()
- func (x *PowerOffClusterResponse) String() string
- type PowerOnClusterRequest
- func (*PowerOnClusterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PowerOnClusterRequest) GetAccountName() string
- func (x *PowerOnClusterRequest) GetClusterId() string
- func (x *PowerOnClusterRequest) GetInstancesIdList() []string
- func (x *PowerOnClusterRequest) GetRegion() string
- func (*PowerOnClusterRequest) ProtoMessage()
- func (x *PowerOnClusterRequest) ProtoReflect() protoreflect.Message
- func (x *PowerOnClusterRequest) Reset()
- func (x *PowerOnClusterRequest) String() string
- type PowerOnClusterResponse
- func (*PowerOnClusterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PowerOnClusterResponse) GetError() int32
- func (x *PowerOnClusterResponse) GetMessage() string
- func (*PowerOnClusterResponse) ProtoMessage()
- func (x *PowerOnClusterResponse) ProtoReflect() protoreflect.Message
- func (x *PowerOnClusterResponse) Reset()
- func (x *PowerOnClusterResponse) String() string
- type UnimplementedAgentServiceServer
- type UnsafeAgentServiceServer
Constants ¶
const ( AgentService_PowerOnCluster_FullMethodName = "/agent.AgentService/PowerOnCluster" AgentService_PowerOffCluster_FullMethodName = "/agent.AgentService/PowerOffCluster" )
Variables ¶
var AgentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agent.AgentService", HandlerType: (*AgentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PowerOnCluster", Handler: _AgentService_PowerOnCluster_Handler, }, { MethodName: "PowerOffCluster", Handler: _AgentService_PowerOffCluster_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cmd/agent/proto/agent.proto", }
AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cmd_agent_proto_agent_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAgentServiceServer ¶
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
Types ¶
type AgentServiceClient ¶
type AgentServiceClient interface {
PowerOnCluster(ctx context.Context, in *PowerOnClusterRequest, opts ...grpc.CallOption) (*PowerOnClusterResponse, error)
PowerOffCluster(ctx context.Context, in *PowerOffClusterRequest, opts ...grpc.CallOption) (*PowerOffClusterResponse, error)
}
AgentServiceClient is the client API for AgentService 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.
gRPC service for the Agent
func NewAgentServiceClient ¶
func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient
type AgentServiceServer ¶
type AgentServiceServer interface {
PowerOnCluster(context.Context, *PowerOnClusterRequest) (*PowerOnClusterResponse, error)
PowerOffCluster(context.Context, *PowerOffClusterRequest) (*PowerOffClusterResponse, error)
// contains filtered or unexported methods
}
AgentServiceServer is the server API for AgentService service. All implementations must embed UnimplementedAgentServiceServer for forward compatibility.
gRPC service for the Agent
type PowerOffClusterRequest ¶
type PowerOffClusterRequest struct {
AccountName string `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
InstancesIdList []string `protobuf:"bytes,4,rep,name=instances_id_list,json=instancesIdList,proto3" json:"instances_id_list,omitempty"`
// contains filtered or unexported fields
}
Message for requesting power off a cluster
func (*PowerOffClusterRequest) Descriptor
deprecated
func (*PowerOffClusterRequest) Descriptor() ([]byte, []int)
Deprecated: Use PowerOffClusterRequest.ProtoReflect.Descriptor instead.
func (*PowerOffClusterRequest) GetAccountName ¶
func (x *PowerOffClusterRequest) GetAccountName() string
func (*PowerOffClusterRequest) GetClusterId ¶
func (x *PowerOffClusterRequest) GetClusterId() string
func (*PowerOffClusterRequest) GetInstancesIdList ¶
func (x *PowerOffClusterRequest) GetInstancesIdList() []string
func (*PowerOffClusterRequest) GetRegion ¶
func (x *PowerOffClusterRequest) GetRegion() string
func (*PowerOffClusterRequest) ProtoMessage ¶
func (*PowerOffClusterRequest) ProtoMessage()
func (*PowerOffClusterRequest) ProtoReflect ¶
func (x *PowerOffClusterRequest) ProtoReflect() protoreflect.Message
func (*PowerOffClusterRequest) Reset ¶
func (x *PowerOffClusterRequest) Reset()
func (*PowerOffClusterRequest) String ¶
func (x *PowerOffClusterRequest) String() string
type PowerOffClusterResponse ¶
type PowerOffClusterResponse struct {
// if error != 0, there was an error during the action. If error == 0, the request was sucessfully completed
Error int32 `protobuf:"varint,1,opt,name=error,proto3" json:"error,omitempty"`
// message with additional info
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Message for answering to PowerOffClusterRequests
func (*PowerOffClusterResponse) Descriptor
deprecated
func (*PowerOffClusterResponse) Descriptor() ([]byte, []int)
Deprecated: Use PowerOffClusterResponse.ProtoReflect.Descriptor instead.
func (*PowerOffClusterResponse) GetError ¶
func (x *PowerOffClusterResponse) GetError() int32
func (*PowerOffClusterResponse) GetMessage ¶
func (x *PowerOffClusterResponse) GetMessage() string
func (*PowerOffClusterResponse) ProtoMessage ¶
func (*PowerOffClusterResponse) ProtoMessage()
func (*PowerOffClusterResponse) ProtoReflect ¶
func (x *PowerOffClusterResponse) ProtoReflect() protoreflect.Message
func (*PowerOffClusterResponse) Reset ¶
func (x *PowerOffClusterResponse) Reset()
func (*PowerOffClusterResponse) String ¶
func (x *PowerOffClusterResponse) String() string
type PowerOnClusterRequest ¶
type PowerOnClusterRequest struct {
AccountName string `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
ClusterId string `protobuf:"bytes,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
InstancesIdList []string `protobuf:"bytes,4,rep,name=instances_id_list,json=instancesIdList,proto3" json:"instances_id_list,omitempty"`
// contains filtered or unexported fields
}
Message for requesting power on a cluster
func (*PowerOnClusterRequest) Descriptor
deprecated
func (*PowerOnClusterRequest) Descriptor() ([]byte, []int)
Deprecated: Use PowerOnClusterRequest.ProtoReflect.Descriptor instead.
func (*PowerOnClusterRequest) GetAccountName ¶
func (x *PowerOnClusterRequest) GetAccountName() string
func (*PowerOnClusterRequest) GetClusterId ¶
func (x *PowerOnClusterRequest) GetClusterId() string
func (*PowerOnClusterRequest) GetInstancesIdList ¶
func (x *PowerOnClusterRequest) GetInstancesIdList() []string
func (*PowerOnClusterRequest) GetRegion ¶
func (x *PowerOnClusterRequest) GetRegion() string
func (*PowerOnClusterRequest) ProtoMessage ¶
func (*PowerOnClusterRequest) ProtoMessage()
func (*PowerOnClusterRequest) ProtoReflect ¶
func (x *PowerOnClusterRequest) ProtoReflect() protoreflect.Message
func (*PowerOnClusterRequest) Reset ¶
func (x *PowerOnClusterRequest) Reset()
func (*PowerOnClusterRequest) String ¶
func (x *PowerOnClusterRequest) String() string
type PowerOnClusterResponse ¶
type PowerOnClusterResponse struct {
// if error != 0, there was an error during the action. If error == 0, the request was sucessfully completed
Error int32 `protobuf:"varint,1,opt,name=error,proto3" json:"error,omitempty"`
// message with additional info
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Message for answering to PowerOnClusterRequests
func (*PowerOnClusterResponse) Descriptor
deprecated
func (*PowerOnClusterResponse) Descriptor() ([]byte, []int)
Deprecated: Use PowerOnClusterResponse.ProtoReflect.Descriptor instead.
func (*PowerOnClusterResponse) GetError ¶
func (x *PowerOnClusterResponse) GetError() int32
func (*PowerOnClusterResponse) GetMessage ¶
func (x *PowerOnClusterResponse) GetMessage() string
func (*PowerOnClusterResponse) ProtoMessage ¶
func (*PowerOnClusterResponse) ProtoMessage()
func (*PowerOnClusterResponse) ProtoReflect ¶
func (x *PowerOnClusterResponse) ProtoReflect() protoreflect.Message
func (*PowerOnClusterResponse) Reset ¶
func (x *PowerOnClusterResponse) Reset()
func (*PowerOnClusterResponse) String ¶
func (x *PowerOnClusterResponse) String() string
type UnimplementedAgentServiceServer ¶
type UnimplementedAgentServiceServer struct{}
UnimplementedAgentServiceServer 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 (UnimplementedAgentServiceServer) PowerOffCluster ¶
func (UnimplementedAgentServiceServer) PowerOffCluster(context.Context, *PowerOffClusterRequest) (*PowerOffClusterResponse, error)
func (UnimplementedAgentServiceServer) PowerOnCluster ¶
func (UnimplementedAgentServiceServer) PowerOnCluster(context.Context, *PowerOnClusterRequest) (*PowerOnClusterResponse, error)
type UnsafeAgentServiceServer ¶
type UnsafeAgentServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServiceServer will result in compilation errors.