grpc

package
v0.0.0-...-e9d364a Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Enum value maps for BlockMetadataType.

View Source
var File_schema_proto protoreflect.FileDescriptor
View Source
var SnapshotMetadata_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "SnapshotMetadata",
	HandlerType: (*SnapshotMetadataServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetAllocated",
			Handler:       _SnapshotMetadata_GetAllocated_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetDelta",
			Handler:       _SnapshotMetadata_GetDelta_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 0 based byte position in the volume or snapshot,
	// measured from the start of the object.
	ByteOffset uint64 `protobuf:"varint,1,opt,name=byte_offset,json=byteOffset,proto3" json:"byte_offset,omitempty"`
	// This is the size of the data range.
	SizeBytes uint64 `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() uint64

func (*BlockMetadata) GetSizeBytes

func (x *BlockMetadata) GetSizeBytes() uint64

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 (
	// The FIXED_LENGTH value indicates that data ranges are
	// returned in fixed size blocks.
	BlockMetadataType_FIXED_LENGTH BlockMetadataType = 0
	// The VARIABLE_LENGTH value indicates that data ranges
	// are returned in potentially variable sized extents.
	BlockMetadataType_VARIABLE_LENGTH BlockMetadataType = 1
)

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 GetAllocatedRequest

type GetAllocatedRequest struct {

	// This is the identifier of the snapshot.
	SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,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 plugins may round down this offset to the nearest alignment
	// boundary based on the BlockMetadataType used.
	StartingOffset uint64 `protobuf:"varint,2,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
	// GetAllocatedResponse message returned by the RPC stream.
	// The plugin will determine an appropriate value if 0, and is
	// always free to send less than the requested value.
	MaxResults uint32 `protobuf:"varint,3,opt,name=max_results,json=maxResults,proto3" json:"max_results,omitempty"`
	// contains filtered or unexported fields
}

The GetAllocatedRequest 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 (*GetAllocatedRequest) Descriptor deprecated

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

Deprecated: Use GetAllocatedRequest.ProtoReflect.Descriptor instead.

func (*GetAllocatedRequest) GetMaxResults

func (x *GetAllocatedRequest) GetMaxResults() uint32

func (*GetAllocatedRequest) GetSnapshotId

func (x *GetAllocatedRequest) GetSnapshotId() string

func (*GetAllocatedRequest) GetStartingOffset

func (x *GetAllocatedRequest) GetStartingOffset() uint64

func (*GetAllocatedRequest) ProtoMessage

func (*GetAllocatedRequest) ProtoMessage()

func (*GetAllocatedRequest) ProtoReflect

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

func (*GetAllocatedRequest) Reset

func (x *GetAllocatedRequest) Reset()

func (*GetAllocatedRequest) String

func (x *GetAllocatedRequest) String() string

type GetAllocatedResponse

type GetAllocatedResponse struct {

	// This specifies the style used in the BlockMetadata sequence.
	// This value must be the same in all such messages returned by
	// the stream.
	BlockMetadataType BlockMetadataType `` /* 138-byte string literal not displayed */
	// This returns the size of the underlying volume.
	// This value must be the same in all such messages returned by
	// the stream.
	VolumeSizeBytes uint64 `protobuf:"varint,2,opt,name=volume_size_bytes,json=volumeSizeBytes,proto3" json:"volume_size_bytes,omitempty"`
	// This is list of data range tuples. The number of entries
	// in this list is controlled by the max_results value in the
	// GetAllocatedRequest message.
	BlockMetadata []*BlockMetadata `protobuf:"bytes,3,rep,name=block_metadata,json=blockMetadata,proto3" json:"block_metadata,omitempty"`
	// contains filtered or unexported fields
}

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

func (*GetAllocatedResponse) Descriptor deprecated

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

Deprecated: Use GetAllocatedResponse.ProtoReflect.Descriptor instead.

func (*GetAllocatedResponse) GetBlockMetadata

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

func (*GetAllocatedResponse) GetBlockMetadataType

func (x *GetAllocatedResponse) GetBlockMetadataType() BlockMetadataType

func (*GetAllocatedResponse) GetVolumeSizeBytes

func (x *GetAllocatedResponse) GetVolumeSizeBytes() uint64

func (*GetAllocatedResponse) ProtoMessage

func (*GetAllocatedResponse) ProtoMessage()

func (*GetAllocatedResponse) ProtoReflect

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

func (*GetAllocatedResponse) Reset

func (x *GetAllocatedResponse) Reset()

func (*GetAllocatedResponse) String

func (x *GetAllocatedResponse) String() string

type GetDeltaRequest

type GetDeltaRequest struct {

	// This is the identifier of the snapshot against which changes
	// are to be computed.
	BaseSnapshotId string `protobuf:"bytes,1,opt,name=base_snapshot_id,json=baseSnapshotId,proto3" json:"base_snapshot_id,omitempty"`
	// This is the identifier of a second snapshot in the same volume,
	// created after the base snapshot.
	TargetSnapshotId string `protobuf:"bytes,2,opt,name=target_snapshot_id,json=targetSnapshotId,proto3" json:"target_snapshot_id,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 plugins may round down this offset to the nearest alignment
	// boundary based on the BlockMetadataType used.
	StartingOffset uint64 `protobuf:"varint,3,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
	// GetDeltaResponse message returned by the RPC stream.
	// The plugin will determine an appropriate value if 0, and is
	// always free to send less than the requested value.
	MaxResults uint32 `protobuf:"varint,4,opt,name=max_results,json=maxResults,proto3" json:"max_results,omitempty"`
	// contains filtered or unexported fields
}

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

func (*GetDeltaRequest) Descriptor deprecated

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

Deprecated: Use GetDeltaRequest.ProtoReflect.Descriptor instead.

func (*GetDeltaRequest) GetBaseSnapshotId

func (x *GetDeltaRequest) GetBaseSnapshotId() string

func (*GetDeltaRequest) GetMaxResults

func (x *GetDeltaRequest) GetMaxResults() uint32

func (*GetDeltaRequest) GetStartingOffset

func (x *GetDeltaRequest) GetStartingOffset() uint64

func (*GetDeltaRequest) GetTargetSnapshotId

func (x *GetDeltaRequest) GetTargetSnapshotId() string

func (*GetDeltaRequest) ProtoMessage

func (*GetDeltaRequest) ProtoMessage()

func (*GetDeltaRequest) ProtoReflect

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

func (*GetDeltaRequest) Reset

func (x *GetDeltaRequest) Reset()

func (*GetDeltaRequest) String

func (x *GetDeltaRequest) String() string

type GetDeltaResponse

type GetDeltaResponse struct {

	// This specifies the style used in the BlockMetadata sequence.
	// This value must be the same in all such messages returned by
	// the stream.
	BlockMetadataType BlockMetadataType `` /* 138-byte string literal not displayed */
	// This returns the size of the underlying volume.
	// This value must be the same in all such messages returned by
	// the stream.
	VolumeSizeBytes uint64 `protobuf:"varint,2,opt,name=volume_size_bytes,json=volumeSizeBytes,proto3" json:"volume_size_bytes,omitempty"`
	// This is list of data range tuples. The number of entries
	// in this list is controlled by the max_results value in the
	// GetDeltaRequest message.
	BlockMetadata []*BlockMetadata `protobuf:"bytes,3,rep,name=block_metadata,json=blockMetadata,proto3" json:"block_metadata,omitempty"`
	// contains filtered or unexported fields
}

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

func (*GetDeltaResponse) Descriptor deprecated

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

Deprecated: Use GetDeltaResponse.ProtoReflect.Descriptor instead.

func (*GetDeltaResponse) GetBlockMetadata

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

func (*GetDeltaResponse) GetBlockMetadataType

func (x *GetDeltaResponse) GetBlockMetadataType() BlockMetadataType

func (*GetDeltaResponse) GetVolumeSizeBytes

func (x *GetDeltaResponse) GetVolumeSizeBytes() uint64

func (*GetDeltaResponse) ProtoMessage

func (*GetDeltaResponse) ProtoMessage()

func (*GetDeltaResponse) ProtoReflect

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

func (*GetDeltaResponse) Reset

func (x *GetDeltaResponse) Reset()

func (*GetDeltaResponse) String

func (x *GetDeltaResponse) String() string

type SnapshotMetadataClient

type SnapshotMetadataClient interface {
	GetAllocated(ctx context.Context, in *GetAllocatedRequest, opts ...grpc.CallOption) (SnapshotMetadata_GetAllocatedClient, error)
	GetDelta(ctx context.Context, in *GetDeltaRequest, opts ...grpc.CallOption) (SnapshotMetadata_GetDeltaClient, 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 {
	GetAllocated(*GetAllocatedRequest, SnapshotMetadata_GetAllocatedServer) error
	GetDelta(*GetDeltaRequest, SnapshotMetadata_GetDeltaServer) error
}

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

type SnapshotMetadata_GetAllocatedClient

type SnapshotMetadata_GetAllocatedClient interface {
	Recv() (*GetAllocatedResponse, error)
	grpc.ClientStream
}

type SnapshotMetadata_GetAllocatedServer

type SnapshotMetadata_GetAllocatedServer interface {
	Send(*GetAllocatedResponse) error
	grpc.ServerStream
}

type SnapshotMetadata_GetDeltaClient

type SnapshotMetadata_GetDeltaClient interface {
	Recv() (*GetDeltaResponse, error)
	grpc.ClientStream
}

type SnapshotMetadata_GetDeltaServer

type SnapshotMetadata_GetDeltaServer interface {
	Send(*GetDeltaResponse) error
	grpc.ServerStream
}

type UnimplementedSnapshotMetadataServer

type UnimplementedSnapshotMetadataServer struct {
}

UnimplementedSnapshotMetadataServer must be embedded to have forward compatible implementations.

func (UnimplementedSnapshotMetadataServer) GetAllocated

func (UnimplementedSnapshotMetadataServer) GetDelta

type UnsafeSnapshotMetadataServer

type UnsafeSnapshotMetadataServer interface {
}

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