proto

package module
v1.13.0 Latest Latest
Warning

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

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

Documentation

Overview

Package proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	CacheService_Put_FullMethodName                  = "/cache.CacheService/Put"
	CacheService_PutObject_FullMethodName            = "/cache.CacheService/PutObject"
	CacheService_Get_FullMethodName                  = "/cache.CacheService/Get"
	CacheService_Delete_FullMethodName               = "/cache.CacheService/Delete"
	CacheService_GetObjectWithVersion_FullMethodName = "/cache.CacheService/GetObjectWithVersion"
	CacheService_PutObjectIfVersion_FullMethodName   = "/cache.CacheService/PutObjectIfVersion"
	CacheService_DeleteIfVersion_FullMethodName      = "/cache.CacheService/DeleteIfVersion"
	CacheService_PutStreamIfVersion_FullMethodName   = "/cache.CacheService/PutStreamIfVersion"
	CacheService_GetStreamWithVersion_FullMethodName = "/cache.CacheService/GetStreamWithVersion"
	CacheService_List_FullMethodName                 = "/cache.CacheService/List"
	CacheService_ListLocal_FullMethodName            = "/cache.CacheService/ListLocal"
	CacheService_ListWithValues_FullMethodName       = "/cache.CacheService/ListWithValues"
	CacheService_ListLocalWithValues_FullMethodName  = "/cache.CacheService/ListLocalWithValues"
	CacheService_GetTopology_FullMethodName          = "/cache.CacheService/GetTopology"
)

Variables

View Source
var CacheService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cache.CacheService",
	HandlerType: (*CacheServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PutObject",
			Handler:    _CacheService_PutObject_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _CacheService_Delete_Handler,
		},
		{
			MethodName: "GetObjectWithVersion",
			Handler:    _CacheService_GetObjectWithVersion_Handler,
		},
		{
			MethodName: "PutObjectIfVersion",
			Handler:    _CacheService_PutObjectIfVersion_Handler,
		},
		{
			MethodName: "DeleteIfVersion",
			Handler:    _CacheService_DeleteIfVersion_Handler,
		},
		{
			MethodName: "List",
			Handler:    _CacheService_List_Handler,
		},
		{
			MethodName: "ListLocal",
			Handler:    _CacheService_ListLocal_Handler,
		},
		{
			MethodName: "ListWithValues",
			Handler:    _CacheService_ListWithValues_Handler,
		},
		{
			MethodName: "ListLocalWithValues",
			Handler:    _CacheService_ListLocalWithValues_Handler,
		},
		{
			MethodName: "GetTopology",
			Handler:    _CacheService_GetTopology_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Put",
			Handler:       _CacheService_Put_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Get",
			Handler:       _CacheService_Get_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "PutStreamIfVersion",
			Handler:       _CacheService_PutStreamIfVersion_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "GetStreamWithVersion",
			Handler:       _CacheService_GetStreamWithVersion_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "cache.proto",
}

CacheService_ServiceDesc is the grpc.ServiceDesc for CacheService 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_cache_proto protoreflect.FileDescriptor

Functions

func RegisterCacheServiceHandler

func RegisterCacheServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCacheServiceHandler registers the http handlers for service CacheService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCacheServiceHandlerClient

func RegisterCacheServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CacheServiceClient) error

RegisterCacheServiceHandlerClient registers the http handlers for service CacheService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CacheServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CacheServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CacheServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterCacheServiceHandlerFromEndpoint

func RegisterCacheServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCacheServiceHandlerFromEndpoint is same as RegisterCacheServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCacheServiceHandlerServer

func RegisterCacheServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CacheServiceServer) error

RegisterCacheServiceHandlerServer registers the http handlers for service CacheService to "mux". UnaryRPC :call CacheServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCacheServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterCacheServiceServer

func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer)

Types

type CacheServiceClient

type CacheServiceClient interface {
	Put(ctx context.Context, opts ...grpc.CallOption) (CacheService_PutClient, error)
	PutObject(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (CacheService_GetClient, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	// Conditional (compare-and-swap) operations — issue #254. Each carries a
	// per-key version; a write applies only if the current version matches the
	// caller's expectation. A lost race is reported as success=false with the
	// current version, not a transport error.
	GetObjectWithVersion(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetWithVersionResponse, error)
	PutObjectIfVersion(ctx context.Context, in *PutIfVersionRequest, opts ...grpc.CallOption) (*PutIfVersionResponse, error)
	DeleteIfVersion(ctx context.Context, in *DeleteIfVersionRequest, opts ...grpc.CallOption) (*DeleteIfVersionResponse, error)
	// Streaming variants for values larger than the unary message cap (issue
	// #258). PutStreamIfVersion carries key/ttl/expected_version in the first
	// message and value bytes in the rest (like Put). GetStreamWithVersion sends
	// version+found in the first message and value bytes in the rest (like Get).
	PutStreamIfVersion(ctx context.Context, opts ...grpc.CallOption) (CacheService_PutStreamIfVersionClient, error)
	GetStreamWithVersion(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (CacheService_GetStreamWithVersionClient, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	// ListLocal is an internal RPC for cluster mode: queries local node only
	// Returns sorted, paginated keys from this node's storage
	ListLocal(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	ListWithValues(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListWithValuesResponse, error)
	// ListLocalWithValues is an internal RPC for cluster mode: queries local node only
	// Returns sorted, paginated key-value pairs from this node's storage
	ListLocalWithValues(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListWithValuesResponse, error)
	GetTopology(ctx context.Context, in *GetTopologyRequest, opts ...grpc.CallOption) (*GetTopologyResponse, error)
}

CacheServiceClient is the client API for CacheService 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 CacheServiceServer

type CacheServiceServer interface {
	Put(CacheService_PutServer) error
	PutObject(context.Context, *PutRequest) (*PutResponse, error)
	Get(*GetRequest, CacheService_GetServer) error
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// Conditional (compare-and-swap) operations — issue #254. Each carries a
	// per-key version; a write applies only if the current version matches the
	// caller's expectation. A lost race is reported as success=false with the
	// current version, not a transport error.
	GetObjectWithVersion(context.Context, *GetRequest) (*GetWithVersionResponse, error)
	PutObjectIfVersion(context.Context, *PutIfVersionRequest) (*PutIfVersionResponse, error)
	DeleteIfVersion(context.Context, *DeleteIfVersionRequest) (*DeleteIfVersionResponse, error)
	// Streaming variants for values larger than the unary message cap (issue
	// #258). PutStreamIfVersion carries key/ttl/expected_version in the first
	// message and value bytes in the rest (like Put). GetStreamWithVersion sends
	// version+found in the first message and value bytes in the rest (like Get).
	PutStreamIfVersion(CacheService_PutStreamIfVersionServer) error
	GetStreamWithVersion(*GetRequest, CacheService_GetStreamWithVersionServer) error
	List(context.Context, *ListRequest) (*ListResponse, error)
	// ListLocal is an internal RPC for cluster mode: queries local node only
	// Returns sorted, paginated keys from this node's storage
	ListLocal(context.Context, *ListRequest) (*ListResponse, error)
	ListWithValues(context.Context, *ListRequest) (*ListWithValuesResponse, error)
	// ListLocalWithValues is an internal RPC for cluster mode: queries local node only
	// Returns sorted, paginated key-value pairs from this node's storage
	ListLocalWithValues(context.Context, *ListRequest) (*ListWithValuesResponse, error)
	GetTopology(context.Context, *GetTopologyRequest) (*GetTopologyResponse, error)
	// contains filtered or unexported methods
}

CacheServiceServer is the server API for CacheService service. All implementations must embed UnimplementedCacheServiceServer for forward compatibility

type CacheService_GetClient

type CacheService_GetClient interface {
	Recv() (*GetResponse, error)
	grpc.ClientStream
}

type CacheService_GetServer

type CacheService_GetServer interface {
	Send(*GetResponse) error
	grpc.ServerStream
}

type CacheService_GetStreamWithVersionClient added in v1.12.0

type CacheService_GetStreamWithVersionClient interface {
	Recv() (*GetWithVersionResponse, error)
	grpc.ClientStream
}

type CacheService_GetStreamWithVersionServer added in v1.12.0

type CacheService_GetStreamWithVersionServer interface {
	Send(*GetWithVersionResponse) error
	grpc.ServerStream
}

type CacheService_PutClient

type CacheService_PutClient interface {
	Send(*PutRequest) error
	CloseAndRecv() (*PutResponse, error)
	grpc.ClientStream
}

type CacheService_PutServer

type CacheService_PutServer interface {
	SendAndClose(*PutResponse) error
	Recv() (*PutRequest, error)
	grpc.ServerStream
}

type CacheService_PutStreamIfVersionClient added in v1.12.0

type CacheService_PutStreamIfVersionClient interface {
	Send(*PutIfVersionRequest) error
	CloseAndRecv() (*PutIfVersionResponse, error)
	grpc.ClientStream
}

type CacheService_PutStreamIfVersionServer added in v1.12.0

type CacheService_PutStreamIfVersionServer interface {
	SendAndClose(*PutIfVersionResponse) error
	Recv() (*PutIfVersionRequest, error)
	grpc.ServerStream
}

type DeleteIfVersionRequest added in v1.12.0

type DeleteIfVersionRequest struct {
	Key             string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	ExpectedVersion uint64 `protobuf:"varint,2,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteIfVersionRequest) Descriptor deprecated added in v1.12.0

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

Deprecated: Use DeleteIfVersionRequest.ProtoReflect.Descriptor instead.

func (*DeleteIfVersionRequest) GetExpectedVersion added in v1.12.0

func (x *DeleteIfVersionRequest) GetExpectedVersion() uint64

func (*DeleteIfVersionRequest) GetKey added in v1.12.0

func (x *DeleteIfVersionRequest) GetKey() string

func (*DeleteIfVersionRequest) ProtoMessage added in v1.12.0

func (*DeleteIfVersionRequest) ProtoMessage()

func (*DeleteIfVersionRequest) ProtoReflect added in v1.12.0

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

func (*DeleteIfVersionRequest) Reset added in v1.12.0

func (x *DeleteIfVersionRequest) Reset()

func (*DeleteIfVersionRequest) String added in v1.12.0

func (x *DeleteIfVersionRequest) String() string

type DeleteIfVersionResponse added in v1.12.0

type DeleteIfVersionResponse struct {
	Success        bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`                                     // true iff the delete applied (or the key was already absent)
	CurrentVersion uint64 `protobuf:"varint,2,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"` // the key's current version, set on a mismatch (success=false)
	Error          string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`                                          // nonempty only on a real error
	// contains filtered or unexported fields
}

func (*DeleteIfVersionResponse) Descriptor deprecated added in v1.12.0

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

Deprecated: Use DeleteIfVersionResponse.ProtoReflect.Descriptor instead.

func (*DeleteIfVersionResponse) GetCurrentVersion added in v1.12.0

func (x *DeleteIfVersionResponse) GetCurrentVersion() uint64

func (*DeleteIfVersionResponse) GetError added in v1.12.0

func (x *DeleteIfVersionResponse) GetError() string

func (*DeleteIfVersionResponse) GetSuccess added in v1.12.0

func (x *DeleteIfVersionResponse) GetSuccess() bool

func (*DeleteIfVersionResponse) ProtoMessage added in v1.12.0

func (*DeleteIfVersionResponse) ProtoMessage()

func (*DeleteIfVersionResponse) ProtoReflect added in v1.12.0

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

func (*DeleteIfVersionResponse) Reset added in v1.12.0

func (x *DeleteIfVersionResponse) Reset()

func (*DeleteIfVersionResponse) String added in v1.12.0

func (x *DeleteIfVersionResponse) String() string

type DeleteRequest

type DeleteRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetKey

func (x *DeleteRequest) GetKey() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetError

func (x *DeleteResponse) GetError() string

func (*DeleteResponse) GetSuccess

func (x *DeleteResponse) GetSuccess() bool

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type GetRequest

type GetRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Start int64  `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` // inclusive byte offset in the object (0-based)
	End   int64  `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"`     // inclusive byte offset (if 0 or omitted, read to EOF)
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetEnd

func (x *GetRequest) GetEnd() int64

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() string

func (*GetRequest) GetStart

func (x *GetRequest) GetStart() int64

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetData

func (x *GetResponse) GetData() []byte

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type GetTopologyRequest

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

func (*GetTopologyRequest) Descriptor deprecated

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

Deprecated: Use GetTopologyRequest.ProtoReflect.Descriptor instead.

func (*GetTopologyRequest) ProtoMessage

func (*GetTopologyRequest) ProtoMessage()

func (*GetTopologyRequest) ProtoReflect

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

func (*GetTopologyRequest) Reset

func (x *GetTopologyRequest) Reset()

func (*GetTopologyRequest) String

func (x *GetTopologyRequest) String() string

type GetTopologyResponse

type GetTopologyResponse struct {
	Topology *proto.ClusterTopology `protobuf:"bytes,1,opt,name=topology,proto3" json:"topology,omitempty"` // Reuse ClusterTopology from cluster.proto
	Error    string                 `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`       // non-empty if error occurred (e.g., cluster mode not enabled)
	// contains filtered or unexported fields
}

func (*GetTopologyResponse) Descriptor deprecated

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

Deprecated: Use GetTopologyResponse.ProtoReflect.Descriptor instead.

func (*GetTopologyResponse) GetError

func (x *GetTopologyResponse) GetError() string

func (*GetTopologyResponse) GetTopology

func (x *GetTopologyResponse) GetTopology() *proto.ClusterTopology

func (*GetTopologyResponse) ProtoMessage

func (*GetTopologyResponse) ProtoMessage()

func (*GetTopologyResponse) ProtoReflect

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

func (*GetTopologyResponse) Reset

func (x *GetTopologyResponse) Reset()

func (*GetTopologyResponse) String

func (x *GetTopologyResponse) String() string

type GetWithVersionResponse added in v1.12.0

type GetWithVersionResponse struct {
	Data    []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	Found   bool   `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"`
	// contains filtered or unexported fields
}

GetWithVersionResponse carries the value together with its current CAS version (issue #254). found=false means the key is absent, expired, or deleted; version is then an OBSERVATION TOKEN (issue #267), never 0: the stamp of the CAS delete that removed the key while that fence is retained, otherwise a fresh stamp meaning "absent as of now". Pass it back as expected_version to PutObjectIfVersion to order the write against any delete stamped after the observation; pass 0 for the unordered put-if-absent.

func (*GetWithVersionResponse) Descriptor deprecated added in v1.12.0

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

Deprecated: Use GetWithVersionResponse.ProtoReflect.Descriptor instead.

func (*GetWithVersionResponse) GetData added in v1.12.0

func (x *GetWithVersionResponse) GetData() []byte

func (*GetWithVersionResponse) GetFound added in v1.12.0

func (x *GetWithVersionResponse) GetFound() bool

func (*GetWithVersionResponse) GetVersion added in v1.12.0

func (x *GetWithVersionResponse) GetVersion() uint64

func (*GetWithVersionResponse) ProtoMessage added in v1.12.0

func (*GetWithVersionResponse) ProtoMessage()

func (*GetWithVersionResponse) ProtoReflect added in v1.12.0

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

func (*GetWithVersionResponse) Reset added in v1.12.0

func (x *GetWithVersionResponse) Reset()

func (*GetWithVersionResponse) String added in v1.12.0

func (x *GetWithVersionResponse) String() string

type KeyValue

type KeyValue struct {
	Key          string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value        []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	ValueLength  int64  `protobuf:"varint,3,opt,name=value_length,json=valueLength,proto3" json:"value_length,omitempty"`    // Size of the value in bytes (set even when value is omitted)
	ValueOmitted bool   `protobuf:"varint,4,opt,name=value_omitted,json=valueOmitted,proto3" json:"value_omitted,omitempty"` // True if the value was omitted because it exceeds the List value-size cap
	// contains filtered or unexported fields
}

func (*KeyValue) Descriptor deprecated

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

Deprecated: Use KeyValue.ProtoReflect.Descriptor instead.

func (*KeyValue) GetKey

func (x *KeyValue) GetKey() string

func (*KeyValue) GetValue

func (x *KeyValue) GetValue() []byte

func (*KeyValue) GetValueLength

func (x *KeyValue) GetValueLength() int64

func (*KeyValue) GetValueOmitted

func (x *KeyValue) GetValueOmitted() bool

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) ProtoReflect

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

func (*KeyValue) Reset

func (x *KeyValue) Reset()

func (*KeyValue) String

func (x *KeyValue) String() string

type ListRequest

type ListRequest struct {
	Prefix            string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`                                                // Optional prefix to filter keys
	StartKey          string `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`                            // Start listing after this key (exclusive), for pagination
	Limit             int32  `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`                                                 // Maximum number of keys to return (default 1000, max 1000)
	ContinuationToken string `protobuf:"bytes,4,opt,name=continuation_token,json=continuationToken,proto3" json:"continuation_token,omitempty"` // Opaque token for resuming pagination
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetContinuationToken

func (x *ListRequest) GetContinuationToken() string

func (*ListRequest) GetLimit

func (x *ListRequest) GetLimit() int32

func (*ListRequest) GetPrefix

func (x *ListRequest) GetPrefix() string

func (*ListRequest) GetStartKey

func (x *ListRequest) GetStartKey() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Keys              []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	ContinuationToken string   `protobuf:"bytes,2,opt,name=continuation_token,json=continuationToken,proto3" json:"continuation_token,omitempty"` // Token to resume listing from where this response ended
	HasMore           bool     `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`                              // True if more keys are available beyond this page
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetContinuationToken

func (x *ListResponse) GetContinuationToken() string

func (*ListResponse) GetHasMore

func (x *ListResponse) GetHasMore() bool

func (*ListResponse) GetKeys

func (x *ListResponse) GetKeys() []string

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type ListWithValuesResponse

type ListWithValuesResponse struct {
	Entries           []*KeyValue `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	ContinuationToken string      `protobuf:"bytes,2,opt,name=continuation_token,json=continuationToken,proto3" json:"continuation_token,omitempty"` // Token to resume listing from where this response ended
	HasMore           bool        `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`                              // True if more entries are available beyond this page
	// contains filtered or unexported fields
}

func (*ListWithValuesResponse) Descriptor deprecated

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

Deprecated: Use ListWithValuesResponse.ProtoReflect.Descriptor instead.

func (*ListWithValuesResponse) GetContinuationToken

func (x *ListWithValuesResponse) GetContinuationToken() string

func (*ListWithValuesResponse) GetEntries

func (x *ListWithValuesResponse) GetEntries() []*KeyValue

func (*ListWithValuesResponse) GetHasMore

func (x *ListWithValuesResponse) GetHasMore() bool

func (*ListWithValuesResponse) ProtoMessage

func (*ListWithValuesResponse) ProtoMessage()

func (*ListWithValuesResponse) ProtoReflect

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

func (*ListWithValuesResponse) Reset

func (x *ListWithValuesResponse) Reset()

func (*ListWithValuesResponse) String

func (x *ListWithValuesResponse) String() string

type PutIfVersionRequest added in v1.12.0

type PutIfVersionRequest struct {
	Key             string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	TtlSeconds      int64  `protobuf:"varint,2,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"`
	Data            []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	ExpectedVersion uint64 `protobuf:"varint,4,opt,name=expected_version,json=expectedVersion,proto3" json:"expected_version,omitempty"` // a live version, an absent read's token, or 0 = unordered put-if-absent
	// contains filtered or unexported fields
}

func (*PutIfVersionRequest) Descriptor deprecated added in v1.12.0

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

Deprecated: Use PutIfVersionRequest.ProtoReflect.Descriptor instead.

func (*PutIfVersionRequest) GetData added in v1.12.0

func (x *PutIfVersionRequest) GetData() []byte

func (*PutIfVersionRequest) GetExpectedVersion added in v1.12.0

func (x *PutIfVersionRequest) GetExpectedVersion() uint64

func (*PutIfVersionRequest) GetKey added in v1.12.0

func (x *PutIfVersionRequest) GetKey() string

func (*PutIfVersionRequest) GetTtlSeconds added in v1.12.0

func (x *PutIfVersionRequest) GetTtlSeconds() int64

func (*PutIfVersionRequest) ProtoMessage added in v1.12.0

func (*PutIfVersionRequest) ProtoMessage()

func (*PutIfVersionRequest) ProtoReflect added in v1.12.0

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

func (*PutIfVersionRequest) Reset added in v1.12.0

func (x *PutIfVersionRequest) Reset()

func (*PutIfVersionRequest) String added in v1.12.0

func (x *PutIfVersionRequest) String() string

type PutIfVersionResponse added in v1.12.0

type PutIfVersionResponse struct {
	Success        bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`                                     // true iff the CAS applied
	NewVersion     uint64 `protobuf:"varint,2,opt,name=new_version,json=newVersion,proto3" json:"new_version,omitempty"`             // the key's new version, set on success
	CurrentVersion uint64 `protobuf:"varint,3,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"` // the key's current version, set on a mismatch (success=false)
	Error          string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`                                          // nonempty only on a real error (never for a plain mismatch)
	// contains filtered or unexported fields
}

func (*PutIfVersionResponse) Descriptor deprecated added in v1.12.0

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

Deprecated: Use PutIfVersionResponse.ProtoReflect.Descriptor instead.

func (*PutIfVersionResponse) GetCurrentVersion added in v1.12.0

func (x *PutIfVersionResponse) GetCurrentVersion() uint64

func (*PutIfVersionResponse) GetError added in v1.12.0

func (x *PutIfVersionResponse) GetError() string

func (*PutIfVersionResponse) GetNewVersion added in v1.12.0

func (x *PutIfVersionResponse) GetNewVersion() uint64

func (*PutIfVersionResponse) GetSuccess added in v1.12.0

func (x *PutIfVersionResponse) GetSuccess() bool

func (*PutIfVersionResponse) ProtoMessage added in v1.12.0

func (*PutIfVersionResponse) ProtoMessage()

func (*PutIfVersionResponse) ProtoReflect added in v1.12.0

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

func (*PutIfVersionResponse) Reset added in v1.12.0

func (x *PutIfVersionResponse) Reset()

func (*PutIfVersionResponse) String added in v1.12.0

func (x *PutIfVersionResponse) String() string

type PutRequest

type PutRequest struct {
	Key        string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`                                  // the cache key; only required in the first message
	TtlSeconds int64  `protobuf:"varint,2,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // optional TTL; only used in the first message
	Data       []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`                                // raw chunk of the object
	// contains filtered or unexported fields
}

func (*PutRequest) Descriptor deprecated

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

Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.

func (*PutRequest) GetData

func (x *PutRequest) GetData() []byte

func (*PutRequest) GetKey

func (x *PutRequest) GetKey() string

func (*PutRequest) GetTtlSeconds

func (x *PutRequest) GetTtlSeconds() int64

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) ProtoReflect

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

func (*PutRequest) Reset

func (x *PutRequest) Reset()

func (*PutRequest) String

func (x *PutRequest) String() string

type PutResponse

type PutResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // nonempty if something went wrong
	// contains filtered or unexported fields
}

func (*PutResponse) Descriptor deprecated

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

Deprecated: Use PutResponse.ProtoReflect.Descriptor instead.

func (*PutResponse) GetError

func (x *PutResponse) GetError() string

func (*PutResponse) GetSuccess

func (x *PutResponse) GetSuccess() bool

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) ProtoReflect

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

func (*PutResponse) Reset

func (x *PutResponse) Reset()

func (*PutResponse) String

func (x *PutResponse) String() string

type UnimplementedCacheServiceServer

type UnimplementedCacheServiceServer struct {
}

UnimplementedCacheServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCacheServiceServer) Delete

func (UnimplementedCacheServiceServer) DeleteIfVersion added in v1.12.0

func (UnimplementedCacheServiceServer) Get

func (UnimplementedCacheServiceServer) GetObjectWithVersion added in v1.12.0

func (UnimplementedCacheServiceServer) GetStreamWithVersion added in v1.12.0

func (UnimplementedCacheServiceServer) GetTopology

func (UnimplementedCacheServiceServer) List

func (UnimplementedCacheServiceServer) ListLocal

func (UnimplementedCacheServiceServer) ListLocalWithValues

func (UnimplementedCacheServiceServer) ListWithValues

func (UnimplementedCacheServiceServer) Put

func (UnimplementedCacheServiceServer) PutObject

func (UnimplementedCacheServiceServer) PutObjectIfVersion added in v1.12.0

func (UnimplementedCacheServiceServer) PutStreamIfVersion added in v1.12.0

type UnsafeCacheServiceServer

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

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

Jump to

Keyboard shortcuts

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