Documentation ¶
Index ¶
- Variables
- func RegisterSnapshotServiceServer(s grpc.ServiceRegistrar, srv SnapshotServiceServer)
- type AgentErrorCode
- func (AgentErrorCode) Descriptor() protoreflect.EnumDescriptor
- func (x AgentErrorCode) Enum() *AgentErrorCode
- func (AgentErrorCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x AgentErrorCode) Number() protoreflect.EnumNumber
- func (x AgentErrorCode) String() string
- func (AgentErrorCode) Type() protoreflect.EnumType
- type GuestMessage
- func (*GuestMessage) Descriptor() ([]byte, []int)deprecated
- func (m *GuestMessage) GetMsg() isGuestMessage_Msg
- func (x *GuestMessage) GetServerInfo() *ServerInfo
- func (x *GuestMessage) GetSnapshotRequest() *SnapshotRequest
- func (*GuestMessage) ProtoMessage()
- func (x *GuestMessage) ProtoReflect() protoreflect.Message
- func (x *GuestMessage) Reset()
- func (x *GuestMessage) String() string
- type GuestMessage_ServerInfo
- type GuestMessage_SnapshotRequest
- type GuestReady
- type OperationType
- func (OperationType) Descriptor() protoreflect.EnumDescriptor
- func (x OperationType) Enum() *OperationType
- func (OperationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OperationType) Number() protoreflect.EnumNumber
- func (x OperationType) String() string
- func (OperationType) Type() protoreflect.EnumType
- type ServerAck
- type ServerInfo
- type SnapshotRequest
- func (*SnapshotRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SnapshotRequest) GetDiskList() string
- func (x *SnapshotRequest) GetOperationId() int32
- func (x *SnapshotRequest) GetType() OperationType
- func (*SnapshotRequest) ProtoMessage()
- func (x *SnapshotRequest) ProtoReflect() protoreflect.Message
- func (x *SnapshotRequest) Reset()
- func (x *SnapshotRequest) String() string
- type SnapshotResponse
- func (*SnapshotResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SnapshotResponse) GetAgentReturnCode() AgentErrorCode
- func (x *SnapshotResponse) GetOperationId() int32
- func (x *SnapshotResponse) GetScriptsReturnCode() int32
- func (x *SnapshotResponse) GetType() OperationType
- func (*SnapshotResponse) ProtoMessage()
- func (x *SnapshotResponse) ProtoReflect() protoreflect.Message
- func (x *SnapshotResponse) Reset()
- func (x *SnapshotResponse) String() string
- type SnapshotServiceClient
- type SnapshotServiceServer
- type SnapshotService_CreateConnectionClient
- type SnapshotService_CreateConnectionServer
- type SupportedFeatures
- func (SupportedFeatures) Descriptor() protoreflect.EnumDescriptor
- func (x SupportedFeatures) Enum() *SupportedFeatures
- func (SupportedFeatures) EnumDescriptor() ([]byte, []int)deprecated
- func (x SupportedFeatures) Number() protoreflect.EnumNumber
- func (x SupportedFeatures) String() string
- func (SupportedFeatures) Type() protoreflect.EnumType
- type UnimplementedSnapshotServiceServer
- type UnsafeSnapshotServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( OperationType_name = map[int32]string{ 0: "NOT_SET", 1: "PRE_SNAPSHOT", 2: "POST_SNAPSHOT", } OperationType_value = map[string]int32{ "NOT_SET": 0, "PRE_SNAPSHOT": 1, "POST_SNAPSHOT": 2, } )
Enum value maps for OperationType.
var ( SupportedFeatures_name = map[int32]string{ 0: "NONE", 1: "SNAPSHOTS", } SupportedFeatures_value = map[string]int32{ "NONE": 0, "SNAPSHOTS": 1, } )
Enum value maps for SupportedFeatures.
var ( AgentErrorCode_name = map[int32]string{ 0: "NO_ERROR", 1: "INVALID_CONFIG", 2: "SCRIPT_NOT_FOUND", 3: "SCRIPT_TIMED_OUT", 4: "UNHANDLED_SCRIPT_ERROR", } AgentErrorCode_value = map[string]int32{ "NO_ERROR": 0, "INVALID_CONFIG": 1, "SCRIPT_NOT_FOUND": 2, "SCRIPT_TIMED_OUT": 3, "UNHANDLED_SCRIPT_ERROR": 4, } )
Enum value maps for AgentErrorCode.
var File_snapshot_service_proto protoreflect.FileDescriptor
var SnapshotService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cloud.vmm.SnapshotService", HandlerType: (*SnapshotServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "HandleResponsesFromGuest", Handler: _SnapshotService_HandleResponsesFromGuest_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "CreateConnection", Handler: _SnapshotService_CreateConnection_Handler, ServerStreams: true, }, }, Metadata: "snapshot_service.proto", }
SnapshotService_ServiceDesc is the grpc.ServiceDesc for SnapshotService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSnapshotServiceServer ¶
func RegisterSnapshotServiceServer(s grpc.ServiceRegistrar, srv SnapshotServiceServer)
Types ¶
type AgentErrorCode ¶
type AgentErrorCode int32
const ( AgentErrorCode_NO_ERROR AgentErrorCode = 0 // The snapshot config was improper in some way. AgentErrorCode_INVALID_CONFIG AgentErrorCode = 1 // The pre or post snapshot script was not found on disk. AgentErrorCode_SCRIPT_NOT_FOUND AgentErrorCode = 2 // The pre or post snapshot script timed out. AgentErrorCode_SCRIPT_TIMED_OUT AgentErrorCode = 3 // The pre or post snapshot script returned an error, but the "continue on // error" flag was not set. AgentErrorCode_UNHANDLED_SCRIPT_ERROR AgentErrorCode = 4 )
func (AgentErrorCode) Descriptor ¶
func (AgentErrorCode) Descriptor() protoreflect.EnumDescriptor
func (AgentErrorCode) Enum ¶
func (x AgentErrorCode) Enum() *AgentErrorCode
func (AgentErrorCode) EnumDescriptor
deprecated
func (AgentErrorCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use AgentErrorCode.Descriptor instead.
func (AgentErrorCode) Number ¶
func (x AgentErrorCode) Number() protoreflect.EnumNumber
func (AgentErrorCode) String ¶
func (x AgentErrorCode) String() string
func (AgentErrorCode) Type ¶
func (AgentErrorCode) Type() protoreflect.EnumType
type GuestMessage ¶
type GuestMessage struct { // Types that are assignable to Msg: // // *GuestMessage_SnapshotRequest // *GuestMessage_ServerInfo Msg isGuestMessage_Msg `protobuf_oneof:"msg"` // contains filtered or unexported fields }
func (*GuestMessage) Descriptor
deprecated
func (*GuestMessage) Descriptor() ([]byte, []int)
Deprecated: Use GuestMessage.ProtoReflect.Descriptor instead.
func (*GuestMessage) GetMsg ¶
func (m *GuestMessage) GetMsg() isGuestMessage_Msg
func (*GuestMessage) GetServerInfo ¶
func (x *GuestMessage) GetServerInfo() *ServerInfo
func (*GuestMessage) GetSnapshotRequest ¶
func (x *GuestMessage) GetSnapshotRequest() *SnapshotRequest
func (*GuestMessage) ProtoMessage ¶
func (*GuestMessage) ProtoMessage()
func (*GuestMessage) ProtoReflect ¶
func (x *GuestMessage) ProtoReflect() protoreflect.Message
func (*GuestMessage) Reset ¶
func (x *GuestMessage) Reset()
func (*GuestMessage) String ¶
func (x *GuestMessage) String() string
type GuestMessage_ServerInfo ¶
type GuestMessage_ServerInfo struct {
ServerInfo *ServerInfo `protobuf:"bytes,2,opt,name=server_info,json=serverInfo,proto3,oneof"`
}
type GuestMessage_SnapshotRequest ¶
type GuestMessage_SnapshotRequest struct {
SnapshotRequest *SnapshotRequest `protobuf:"bytes,1,opt,name=snapshot_request,json=snapshotRequest,proto3,oneof"`
}
type GuestReady ¶
type GuestReady struct { RequestServerInfo bool `protobuf:"varint,1,opt,name=request_server_info,json=requestServerInfo,proto3" json:"request_server_info,omitempty"` // contains filtered or unexported fields }
func (*GuestReady) Descriptor
deprecated
func (*GuestReady) Descriptor() ([]byte, []int)
Deprecated: Use GuestReady.ProtoReflect.Descriptor instead.
func (*GuestReady) GetRequestServerInfo ¶
func (x *GuestReady) GetRequestServerInfo() bool
func (*GuestReady) ProtoMessage ¶
func (*GuestReady) ProtoMessage()
func (*GuestReady) ProtoReflect ¶
func (x *GuestReady) ProtoReflect() protoreflect.Message
func (*GuestReady) Reset ¶
func (x *GuestReady) Reset()
func (*GuestReady) String ¶
func (x *GuestReady) String() string
type OperationType ¶
type OperationType int32
const ( OperationType_NOT_SET OperationType = 0 OperationType_PRE_SNAPSHOT OperationType = 1 OperationType_POST_SNAPSHOT OperationType = 2 )
func (OperationType) Descriptor ¶
func (OperationType) Descriptor() protoreflect.EnumDescriptor
func (OperationType) Enum ¶
func (x OperationType) Enum() *OperationType
func (OperationType) EnumDescriptor
deprecated
func (OperationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperationType.Descriptor instead.
func (OperationType) Number ¶
func (x OperationType) Number() protoreflect.EnumNumber
func (OperationType) String ¶
func (x OperationType) String() string
func (OperationType) Type ¶
func (OperationType) Type() protoreflect.EnumType
type ServerAck ¶
type ServerAck struct {
// contains filtered or unexported fields
}
func (*ServerAck) Descriptor
deprecated
func (*ServerAck) ProtoMessage ¶
func (*ServerAck) ProtoMessage()
func (*ServerAck) ProtoReflect ¶
func (x *ServerAck) ProtoReflect() protoreflect.Message
type ServerInfo ¶
type ServerInfo struct { SupportedFeatures []SupportedFeatures `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ServerInfo) Descriptor
deprecated
func (*ServerInfo) Descriptor() ([]byte, []int)
Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.
func (*ServerInfo) GetSupportedFeatures ¶
func (x *ServerInfo) GetSupportedFeatures() []SupportedFeatures
func (*ServerInfo) ProtoMessage ¶
func (*ServerInfo) ProtoMessage()
func (*ServerInfo) ProtoReflect ¶
func (x *ServerInfo) ProtoReflect() protoreflect.Message
func (*ServerInfo) Reset ¶
func (x *ServerInfo) Reset()
func (*ServerInfo) String ¶
func (x *ServerInfo) String() string
type SnapshotRequest ¶
type SnapshotRequest struct { // The operation id of the snapshot. OperationId int32 `protobuf:"varint,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` // A list of comma separated target/lun values, e.g "1/2,3/4". DiskList string `protobuf:"bytes,2,opt,name=disk_list,json=diskList,proto3" json:"disk_list,omitempty"` // The operation type. Type OperationType `protobuf:"varint,3,opt,name=type,proto3,enum=cloud.vmm.OperationType" json:"type,omitempty"` // contains filtered or unexported fields }
func (*SnapshotRequest) Descriptor
deprecated
func (*SnapshotRequest) Descriptor() ([]byte, []int)
Deprecated: Use SnapshotRequest.ProtoReflect.Descriptor instead.
func (*SnapshotRequest) GetDiskList ¶
func (x *SnapshotRequest) GetDiskList() string
func (*SnapshotRequest) GetOperationId ¶
func (x *SnapshotRequest) GetOperationId() int32
func (*SnapshotRequest) GetType ¶
func (x *SnapshotRequest) GetType() OperationType
func (*SnapshotRequest) ProtoMessage ¶
func (*SnapshotRequest) ProtoMessage()
func (*SnapshotRequest) ProtoReflect ¶
func (x *SnapshotRequest) ProtoReflect() protoreflect.Message
func (*SnapshotRequest) Reset ¶
func (x *SnapshotRequest) Reset()
func (*SnapshotRequest) String ¶
func (x *SnapshotRequest) String() string
type SnapshotResponse ¶
type SnapshotResponse struct { // The operation id of the snapshot. OperationId int32 `protobuf:"varint,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` // The return code of the scripts run by the guest. If this is non-zero, then // agent_return_code should be UNHANDLED_SCRIPT_ERROR. ScriptsReturnCode int32 `protobuf:"varint,2,opt,name=scripts_return_code,json=scriptsReturnCode,proto3" json:"scripts_return_code,omitempty"` // The agent return code. AgentReturnCode AgentErrorCode `` /* 139-byte string literal not displayed */ // The operation type. Type OperationType `protobuf:"varint,4,opt,name=type,proto3,enum=cloud.vmm.OperationType" json:"type,omitempty"` // contains filtered or unexported fields }
func (*SnapshotResponse) Descriptor
deprecated
func (*SnapshotResponse) Descriptor() ([]byte, []int)
Deprecated: Use SnapshotResponse.ProtoReflect.Descriptor instead.
func (*SnapshotResponse) GetAgentReturnCode ¶
func (x *SnapshotResponse) GetAgentReturnCode() AgentErrorCode
func (*SnapshotResponse) GetOperationId ¶
func (x *SnapshotResponse) GetOperationId() int32
func (*SnapshotResponse) GetScriptsReturnCode ¶
func (x *SnapshotResponse) GetScriptsReturnCode() int32
func (*SnapshotResponse) GetType ¶
func (x *SnapshotResponse) GetType() OperationType
func (*SnapshotResponse) ProtoMessage ¶
func (*SnapshotResponse) ProtoMessage()
func (*SnapshotResponse) ProtoReflect ¶
func (x *SnapshotResponse) ProtoReflect() protoreflect.Message
func (*SnapshotResponse) Reset ¶
func (x *SnapshotResponse) Reset()
func (*SnapshotResponse) String ¶
func (x *SnapshotResponse) String() string
type SnapshotServiceClient ¶
type SnapshotServiceClient interface { // The client is expected to first send a "GuestReady" message, indicating // they are available and establishing the connection that vanadium writes // requests to the agent on. CreateConnection(ctx context.Context, in *GuestReady, opts ...grpc.CallOption) (SnapshotService_CreateConnectionClient, error) // Handles the agent's responses to the above requests. HandleResponsesFromGuest(ctx context.Context, in *SnapshotResponse, opts ...grpc.CallOption) (*ServerAck, error) }
SnapshotServiceClient is the client API for SnapshotService 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 NewSnapshotServiceClient ¶
func NewSnapshotServiceClient(cc grpc.ClientConnInterface) SnapshotServiceClient
type SnapshotServiceServer ¶
type SnapshotServiceServer interface { // The client is expected to first send a "GuestReady" message, indicating // they are available and establishing the connection that vanadium writes // requests to the agent on. CreateConnection(*GuestReady, SnapshotService_CreateConnectionServer) error // Handles the agent's responses to the above requests. HandleResponsesFromGuest(context.Context, *SnapshotResponse) (*ServerAck, error) // contains filtered or unexported methods }
SnapshotServiceServer is the server API for SnapshotService service. All implementations must embed UnimplementedSnapshotServiceServer for forward compatibility
type SnapshotService_CreateConnectionClient ¶
type SnapshotService_CreateConnectionClient interface { Recv() (*GuestMessage, error) grpc.ClientStream }
type SnapshotService_CreateConnectionServer ¶
type SnapshotService_CreateConnectionServer interface { Send(*GuestMessage) error grpc.ServerStream }
type SupportedFeatures ¶
type SupportedFeatures int32
const ( SupportedFeatures_NONE SupportedFeatures = 0 SupportedFeatures_SNAPSHOTS SupportedFeatures = 1 )
func (SupportedFeatures) Descriptor ¶
func (SupportedFeatures) Descriptor() protoreflect.EnumDescriptor
func (SupportedFeatures) Enum ¶
func (x SupportedFeatures) Enum() *SupportedFeatures
func (SupportedFeatures) EnumDescriptor
deprecated
func (SupportedFeatures) EnumDescriptor() ([]byte, []int)
Deprecated: Use SupportedFeatures.Descriptor instead.
func (SupportedFeatures) Number ¶
func (x SupportedFeatures) Number() protoreflect.EnumNumber
func (SupportedFeatures) String ¶
func (x SupportedFeatures) String() string
func (SupportedFeatures) Type ¶
func (SupportedFeatures) Type() protoreflect.EnumType
type UnimplementedSnapshotServiceServer ¶
type UnimplementedSnapshotServiceServer struct { }
UnimplementedSnapshotServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSnapshotServiceServer) CreateConnection ¶
func (UnimplementedSnapshotServiceServer) CreateConnection(*GuestReady, SnapshotService_CreateConnectionServer) error
func (UnimplementedSnapshotServiceServer) HandleResponsesFromGuest ¶
func (UnimplementedSnapshotServiceServer) HandleResponsesFromGuest(context.Context, *SnapshotResponse) (*ServerAck, error)
type UnsafeSnapshotServiceServer ¶
type UnsafeSnapshotServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSnapshotServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SnapshotServiceServer will result in compilation errors.