api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BlockMetadataType_name = map[int32]string{
		0: "UNKNOWN",
		1: "FIXED_LENGTH",
		2: "VARIABLE_LENGTH",
	}
	BlockMetadataType_value = map[string]int32{
		"UNKNOWN":         0,
		"FIXED_LENGTH":    1,
		"VARIABLE_LENGTH": 2,
	}
)

Enum value maps for BlockMetadataType.

View Source
var File_schema_proto protoreflect.FileDescriptor
View Source
var SnapshotMetadata_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "snapshotmetadata.SnapshotMetadata",
	HandlerType: (*SnapshotMetadataServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetMetadataAllocated",
			Handler:       _SnapshotMetadata_GetMetadataAllocated_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetMetadataDelta",
			Handler:       _SnapshotMetadata_GetMetadataDelta_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "schema.proto",
}

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

Functions

func RegisterSnapshotMetadataServer

func RegisterSnapshotMetadataServer(s grpc.ServiceRegistrar, srv SnapshotMetadataServer)

Types

type BlockMetadata

type BlockMetadata struct {

	// This is the zero based byte position in the volume or snapshot,
	// measured from the start of the object.
	// This field is REQUIRED.
	ByteOffset int64 `protobuf:"varint,1,opt,name=byte_offset,json=byteOffset,proto3" json:"byte_offset,omitempty"`
	// This is the size of the data range.
	// size_bytes will be greater than zero.
	// This field is REQUIRED.
	SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
	// contains filtered or unexported fields
}

BlockMetadata specifies a data range.

func (*BlockMetadata) Descriptor deprecated

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

Deprecated: Use BlockMetadata.ProtoReflect.Descriptor instead.

func (*BlockMetadata) GetByteOffset

func (x *BlockMetadata) GetByteOffset() int64

func (*BlockMetadata) GetSizeBytes

func (x *BlockMetadata) GetSizeBytes() int64

func (*BlockMetadata) ProtoMessage

func (*BlockMetadata) ProtoMessage()

func (*BlockMetadata) ProtoReflect

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

func (*BlockMetadata) Reset

func (x *BlockMetadata) Reset()

func (*BlockMetadata) String

func (x *BlockMetadata) String() string

type BlockMetadataType

type BlockMetadataType int32
const (
	BlockMetadataType_UNKNOWN BlockMetadataType = 0
	// The FIXED_LENGTH value indicates that data ranges are
	// returned in fixed size blocks.
	BlockMetadataType_FIXED_LENGTH BlockMetadataType = 1
	// The VARIABLE_LENGTH value indicates that data ranges
	// are returned in potentially variable sized extents.
	BlockMetadataType_VARIABLE_LENGTH BlockMetadataType = 2
)

func (BlockMetadataType) Descriptor

func (BlockMetadataType) Enum

func (BlockMetadataType) EnumDescriptor deprecated

func (BlockMetadataType) EnumDescriptor() ([]byte, []int)

Deprecated: Use BlockMetadataType.Descriptor instead.

func (BlockMetadataType) Number

func (BlockMetadataType) String

func (x BlockMetadataType) String() string

func (BlockMetadataType) Type

type GetMetadataAllocatedRequest

type GetMetadataAllocatedRequest struct {

	// This field specifies an audience scoped authentication token presented by client.
	// This token is used to authenticate and authorize the request at server side.
	// This field is REQUIRED.
	SecurityToken string `protobuf:"bytes,1,opt,name=security_token,json=securityToken,proto3" json:"security_token,omitempty"`
	// This field indicates the Namespace where the VolumeSnapshot exists.
	// If not set, the VolumeSnapshot will be looked for in the "default" Namespace.
	// This field is REQUIRED.
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// This is the VolumeSnapshot object name against which changes
	// are to be computed.
	// This field is REQUIRED.
	SnapshotName string `protobuf:"bytes,3,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"`
	// This indicates the zero based starting byte position in the volume
	// snapshot from which the result should be computed.
	// It is intended to be used to continue a previously interrupted
	// call.
	// The client SHOULD specify this value to be the offset of the byte
	// position immediately after the last byte of the last data range
	// received, if continuing an interrupted operation, or zero if not.
	// The sidecar will ensure that the returned response stream does not
	// contain BlockMetadata tuples that end before the requested
	// starting_offset: i.e. if S is the requested starting_offset, and
	// B0 is block_metadata[0] of the first message in the response
	// stream, then (S < B0.byte_offset + B0.size_bytes) will be true.
	// This field is REQUIRED.
	StartingOffset int64 `protobuf:"varint,4,opt,name=starting_offset,json=startingOffset,proto3" json:"starting_offset,omitempty"`
	// This is an optional parameter, and if non-zero it specifies the
	// maximum number of tuples to be returned in each
	// GetMetadataAllocatedResponse message returned by the RPC stream.
	// The sidecar will determine an appropriate value if 0, and is
	// always free to send less than the requested value.
	// This field is OPTIONAL.
	MaxResults int32 `protobuf:"varint,5,opt,name=max_results,json=maxResults,proto3" json:"max_results,omitempty"`
	// contains filtered or unexported fields
}

The GetMetadataAllocatedRequest message is used to solicit metadata on the allocated blocks of a snapshot: i.e. this identifies the data ranges that have valid data as they were the target of some previous write operation on the volume.

func (*GetMetadataAllocatedRequest) Descriptor deprecated

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

Deprecated: Use GetMetadataAllocatedRequest.ProtoReflect.Descriptor instead.

func (*GetMetadataAllocatedRequest) GetMaxResults

func (x *GetMetadataAllocatedRequest) GetMaxResults() int32

func (*GetMetadataAllocatedRequest) GetNamespace

func (x *GetMetadataAllocatedRequest) GetNamespace() string

func (*GetMetadataAllocatedRequest) GetSecurityToken

func (x *GetMetadataAllocatedRequest) GetSecurityToken() string

func (*GetMetadataAllocatedRequest) GetSnapshotName

func (x *GetMetadataAllocatedRequest) GetSnapshotName() string

func (*GetMetadataAllocatedRequest) GetStartingOffset

func (x *GetMetadataAllocatedRequest) GetStartingOffset() int64

func (*GetMetadataAllocatedRequest) ProtoMessage

func (*GetMetadataAllocatedRequest) ProtoMessage()

func (*GetMetadataAllocatedRequest) ProtoReflect

func (*GetMetadataAllocatedRequest) Reset

func (x *GetMetadataAllocatedRequest) Reset()

func (*GetMetadataAllocatedRequest) String

func (x *GetMetadataAllocatedRequest) String() string

type GetMetadataAllocatedResponse

type GetMetadataAllocatedResponse struct {

	// This specifies the style used in the BlockMetadata sequence.
	// This value must be the same in all such messages returned by
	// the stream.
	// If block_metadata_type is FIXED_LENGTH, then the size_bytes field
	// of each message in the block_metadata list will be constant.
	// This field is REQUIRED.
	BlockMetadataType BlockMetadataType `` /* 155-byte string literal not displayed */
	// This returns the capacity of the underlying volume in bytes.
	// This value must be the same in all such messages returned by
	// the stream.
	// This field is REQUIRED.
	VolumeCapacityBytes int64 `protobuf:"varint,2,opt,name=volume_capacity_bytes,json=volumeCapacityBytes,proto3" json:"volume_capacity_bytes,omitempty"`
	// This is a list of data range tuples.
	// If the value of max_results in the GetMetadataAllocatedRequest
	// message is greater than zero, then the number of entries in this
	// list will be less than or equal to that value.
	// The sidecar will respect the value of starting_offset in the request.
	// The byte_offset fields of adjacent BlockMetadata messages
	// Will be strictly increasing and messages will not overlap:
	// i.e. for any two BlockMetadata messages, A and B, if A is returned
	// before B, then (A.byte_offset + A.size_bytes <= B.byte_offset)
	// will be true.
	// This will also be true if A and B are from block_metadata lists in
	// different GetMetadataAllocatedResponse messages in the gRPC stream.
	// This field is OPTIONAL.
	BlockMetadata []*BlockMetadata `protobuf:"bytes,3,rep,name=block_metadata,json=blockMetadata,proto3" json:"block_metadata,omitempty"`
	// contains filtered or unexported fields
}

GetMetadataAllocatedResponse messages are returned in a gRPC stream. Cumulatively, they provide information on the allocated data ranges in the snapshot.

func (*GetMetadataAllocatedResponse) Descriptor deprecated

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

Deprecated: Use GetMetadataAllocatedResponse.ProtoReflect.Descriptor instead.

func (*GetMetadataAllocatedResponse) GetBlockMetadata

func (x *GetMetadataAllocatedResponse) GetBlockMetadata() []*BlockMetadata

func (*GetMetadataAllocatedResponse) GetBlockMetadataType

func (x *GetMetadataAllocatedResponse) GetBlockMetadataType() BlockMetadataType

func (*GetMetadataAllocatedResponse) GetVolumeCapacityBytes

func (x *GetMetadataAllocatedResponse) GetVolumeCapacityBytes() int64

func (*GetMetadataAllocatedResponse) ProtoMessage

func (*GetMetadataAllocatedResponse) ProtoMessage()

func (*GetMetadataAllocatedResponse) ProtoReflect

func (*GetMetadataAllocatedResponse) Reset

func (x *GetMetadataAllocatedResponse) Reset()

func (*GetMetadataAllocatedResponse) String

type GetMetadataDeltaRequest

type GetMetadataDeltaRequest struct {

	// This field specifies an audience scoped authentication token presented by client.
	// This token is used to authenticate and authorize the request at server side.
	// This field is REQUIRED.
	SecurityToken string `protobuf:"bytes,1,opt,name=security_token,json=securityToken,proto3" json:"security_token,omitempty"`
	// This field indicates the Namespace where the VolumeSnapshot exists.
	// If not set, the VolumeSnapshot will be looked for in the "default" Namespace.
	// This field is REQUIRED.
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// This is the VolumeSnapshot object name against which changes
	// are to be computed.
	// This field is REQUIRED.
	BaseSnapshotName string `protobuf:"bytes,3,opt,name=base_snapshot_name,json=baseSnapshotName,proto3" json:"base_snapshot_name,omitempty"`
	// This is the name of a second VolumeSnapshot in the same volume,
	// created after the base snapshot.
	// This field is REQUIRED.
	TargetSnapshotName string `protobuf:"bytes,4,opt,name=target_snapshot_name,json=targetSnapshotName,proto3" json:"target_snapshot_name,omitempty"`
	// This indicates the zero based starting byte position in the volume
	// snapshot from which the result should be computed.
	// It is intended to be used to continue a previously interrupted
	// call.
	// The client SHOULD specify this value to be the offset of the byte
	// position immediately after the last byte of the last data range
	// received, if continuing an interrupted operation, or zero if not.
	// The sidecar will ensure that the returned response stream does not
	// contain BlockMetadata tuples that end before the requested
	// starting_offset: i.e. if S is the requested starting_offset, and
	// B0 is block_metadata[0] of the first message in the response
	// stream, then (S < B0.byte_offset + B0.size_bytes) will be true.
	// This field is REQUIRED.
	StartingOffset int64 `protobuf:"varint,5,opt,name=starting_offset,json=startingOffset,proto3" json:"starting_offset,omitempty"`
	// This is an optional parameter, and if non-zero it specifies the
	// maximum number of tuples to be returned in each
	// GetMetadataDeltaResponse message returned by the RPC stream.
	// The sidecar will determine an appropriate value if 0, and is
	// always free to send less than the requested value.
	// This field is OPTIONAL.
	MaxResults int32 `protobuf:"varint,6,opt,name=max_results,json=maxResults,proto3" json:"max_results,omitempty"`
	// contains filtered or unexported fields
}

The GetMetadataDeltaRequest message is used to solicit metadata on the data ranges that have changed between two snapshots.

func (*GetMetadataDeltaRequest) Descriptor deprecated

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

Deprecated: Use GetMetadataDeltaRequest.ProtoReflect.Descriptor instead.

func (*GetMetadataDeltaRequest) GetBaseSnapshotName

func (x *GetMetadataDeltaRequest) GetBaseSnapshotName() string

func (*GetMetadataDeltaRequest) GetMaxResults

func (x *GetMetadataDeltaRequest) GetMaxResults() int32

func (*GetMetadataDeltaRequest) GetNamespace

func (x *GetMetadataDeltaRequest) GetNamespace() string

func (*GetMetadataDeltaRequest) GetSecurityToken

func (x *GetMetadataDeltaRequest) GetSecurityToken() string

func (*GetMetadataDeltaRequest) GetStartingOffset

func (x *GetMetadataDeltaRequest) GetStartingOffset() int64

func (*GetMetadataDeltaRequest) GetTargetSnapshotName

func (x *GetMetadataDeltaRequest) GetTargetSnapshotName() string

func (*GetMetadataDeltaRequest) ProtoMessage

func (*GetMetadataDeltaRequest) ProtoMessage()

func (*GetMetadataDeltaRequest) ProtoReflect

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

func (*GetMetadataDeltaRequest) Reset

func (x *GetMetadataDeltaRequest) Reset()

func (*GetMetadataDeltaRequest) String

func (x *GetMetadataDeltaRequest) String() string

type GetMetadataDeltaResponse

type GetMetadataDeltaResponse struct {

	// This specifies the style used in the BlockMetadata sequence.
	// This value must be the same in all such messages returned by
	// the stream.
	// If block_metadata_type is FIXED_LENGTH, then the size_bytes field
	// of each message in the block_metadata list will be constant.
	// This field is REQUIRED.
	BlockMetadataType BlockMetadataType `` /* 155-byte string literal not displayed */
	// This returns the capacity of the underlying volume in bytes.
	// This value must be the same in all such messages returned by
	// the stream.
	// This field is REQUIRED.
	VolumeCapacityBytes int64 `protobuf:"varint,2,opt,name=volume_capacity_bytes,json=volumeCapacityBytes,proto3" json:"volume_capacity_bytes,omitempty"`
	// This is a list of data range tuples.
	// If the value of max_results in the GetMetadataDeltaRequest message
	// is greater than zero, then the number of entries in this list will
	// be less than or equal to that value.
	// The sidecar will respect the value of starting_offset in the request.
	// The byte_offset fields of adjacent BlockMetadata messages
	// Will be strictly increasing and messages will not overlap:
	// i.e. for any two BlockMetadata messages, A and B, if A is returned
	// before B, then (A.byte_offset + A.size_bytes <= B.byte_offset)
	// will be true.
	// This will also be true if A and B are from block_metadata lists in
	// different GetMetadataDeltaResponse messages in the gRPC stream.
	// This field is OPTIONAL.
	BlockMetadata []*BlockMetadata `protobuf:"bytes,3,rep,name=block_metadata,json=blockMetadata,proto3" json:"block_metadata,omitempty"`
	// contains filtered or unexported fields
}

GetMetadataDeltaResponse messages are returned in a gRPC stream. Cumulatively, they provide information on the data ranges that have changed between the base and target snapshots specified in the GetMetadataDeltaRequest message.

func (*GetMetadataDeltaResponse) Descriptor deprecated

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

Deprecated: Use GetMetadataDeltaResponse.ProtoReflect.Descriptor instead.

func (*GetMetadataDeltaResponse) GetBlockMetadata

func (x *GetMetadataDeltaResponse) GetBlockMetadata() []*BlockMetadata

func (*GetMetadataDeltaResponse) GetBlockMetadataType

func (x *GetMetadataDeltaResponse) GetBlockMetadataType() BlockMetadataType

func (*GetMetadataDeltaResponse) GetVolumeCapacityBytes

func (x *GetMetadataDeltaResponse) GetVolumeCapacityBytes() int64

func (*GetMetadataDeltaResponse) ProtoMessage

func (*GetMetadataDeltaResponse) ProtoMessage()

func (*GetMetadataDeltaResponse) ProtoReflect

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

func (*GetMetadataDeltaResponse) Reset

func (x *GetMetadataDeltaResponse) Reset()

func (*GetMetadataDeltaResponse) String

func (x *GetMetadataDeltaResponse) String() string

type SnapshotMetadataClient

type SnapshotMetadataClient interface {
	GetMetadataAllocated(ctx context.Context, in *GetMetadataAllocatedRequest, opts ...grpc.CallOption) (SnapshotMetadata_GetMetadataAllocatedClient, error)
	GetMetadataDelta(ctx context.Context, in *GetMetadataDeltaRequest, opts ...grpc.CallOption) (SnapshotMetadata_GetMetadataDeltaClient, error)
}

SnapshotMetadataClient is the client API for SnapshotMetadata 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.

type SnapshotMetadataServer

type SnapshotMetadataServer interface {
	GetMetadataAllocated(*GetMetadataAllocatedRequest, SnapshotMetadata_GetMetadataAllocatedServer) error
	GetMetadataDelta(*GetMetadataDeltaRequest, SnapshotMetadata_GetMetadataDeltaServer) error
	// contains filtered or unexported methods
}

SnapshotMetadataServer is the server API for SnapshotMetadata service. All implementations must embed UnimplementedSnapshotMetadataServer for forward compatibility

type SnapshotMetadata_GetMetadataAllocatedClient

type SnapshotMetadata_GetMetadataAllocatedClient interface {
	Recv() (*GetMetadataAllocatedResponse, error)
	grpc.ClientStream
}

type SnapshotMetadata_GetMetadataAllocatedServer

type SnapshotMetadata_GetMetadataAllocatedServer interface {
	Send(*GetMetadataAllocatedResponse) error
	grpc.ServerStream
}

type SnapshotMetadata_GetMetadataDeltaClient

type SnapshotMetadata_GetMetadataDeltaClient interface {
	Recv() (*GetMetadataDeltaResponse, error)
	grpc.ClientStream
}

type SnapshotMetadata_GetMetadataDeltaServer

type SnapshotMetadata_GetMetadataDeltaServer interface {
	Send(*GetMetadataDeltaResponse) error
	grpc.ServerStream
}

type UnimplementedSnapshotMetadataServer

type UnimplementedSnapshotMetadataServer struct {
}

UnimplementedSnapshotMetadataServer must be embedded to have forward compatible implementations.

type UnsafeSnapshotMetadataServer

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

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

Jump to

Keyboard shortcuts

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