Documentation ¶
Index ¶
- Variables
- func RegisterGCServer(s *grpc.Server, srv GCServer)
- type ActionResult
- func (*ActionResult) Descriptor() ([]byte, []int)deprecated
- func (x *ActionResult) GetCachePrefix() string
- func (x *ActionResult) GetHash() string
- func (x *ActionResult) GetLastAccessed() int64
- func (x *ActionResult) GetReplicas() int32
- func (x *ActionResult) GetSizeBytes() int64
- func (*ActionResult) ProtoMessage()
- func (x *ActionResult) ProtoReflect() protoreflect.Message
- func (x *ActionResult) Reset()
- func (x *ActionResult) String() string
- type Blob
- func (*Blob) Descriptor() ([]byte, []int)deprecated
- func (x *Blob) GetCachePrefix() string
- func (x *Blob) GetHash() string
- func (x *Blob) GetReplicas() int32
- func (x *Blob) GetSizeBytes() int64
- func (*Blob) ProtoMessage()
- func (x *Blob) ProtoReflect() protoreflect.Message
- func (x *Blob) Reset()
- func (x *Blob) String() string
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetActionResults() []*Blob
- func (x *DeleteRequest) GetBlobs() []*Blob
- func (x *DeleteRequest) GetHard() bool
- func (x *DeleteRequest) GetPrefix() string
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- type DeleteResponse
- type GCClient
- type GCServer
- type ListRequest
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetActionResults() []*ActionResult
- func (x *ListResponse) GetBlobs() []*Blob
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- type UnimplementedGCServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_purity_purity_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGCServer ¶
Types ¶
type ActionResult ¶
type ActionResult struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` LastAccessed int64 `protobuf:"varint,3,opt,name=last_accessed,json=lastAccessed,proto3" json:"last_accessed,omitempty"` Replicas int32 `protobuf:"varint,4,opt,name=replicas,proto3" json:"replicas,omitempty"` CachePrefix string `protobuf:"bytes,5,opt,name=cache_prefix,json=cachePrefix,proto3" json:"cache_prefix,omitempty"` // contains filtered or unexported fields }
An ActionResult is a reference to an action result with a little additional information.
func (*ActionResult) Descriptor
deprecated
func (*ActionResult) Descriptor() ([]byte, []int)
Deprecated: Use ActionResult.ProtoReflect.Descriptor instead.
func (*ActionResult) GetCachePrefix ¶
func (x *ActionResult) GetCachePrefix() string
func (*ActionResult) GetHash ¶
func (x *ActionResult) GetHash() string
func (*ActionResult) GetLastAccessed ¶
func (x *ActionResult) GetLastAccessed() int64
func (*ActionResult) GetReplicas ¶
func (x *ActionResult) GetReplicas() int32
func (*ActionResult) GetSizeBytes ¶
func (x *ActionResult) GetSizeBytes() int64
func (*ActionResult) ProtoMessage ¶
func (*ActionResult) ProtoMessage()
func (*ActionResult) ProtoReflect ¶
func (x *ActionResult) ProtoReflect() protoreflect.Message
func (*ActionResult) Reset ¶
func (x *ActionResult) Reset()
func (*ActionResult) String ¶
func (x *ActionResult) String() string
type Blob ¶
type Blob struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` Replicas int32 `protobuf:"varint,4,opt,name=replicas,proto3" json:"replicas,omitempty"` CachePrefix string `protobuf:"bytes,5,opt,name=cache_prefix,json=cachePrefix,proto3" json:"cache_prefix,omitempty"` // contains filtered or unexported fields }
func (*Blob) Descriptor
deprecated
func (*Blob) GetCachePrefix ¶
func (*Blob) GetReplicas ¶
func (*Blob) GetSizeBytes ¶
func (*Blob) ProtoMessage ¶
func (*Blob) ProtoMessage()
func (*Blob) ProtoReflect ¶
func (x *Blob) ProtoReflect() protoreflect.Message
type DeleteRequest ¶
type DeleteRequest struct { // Prefix of blobs to delete. Should be exactly two hex characters. Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` // Action results to delete. ActionResults []*Blob `protobuf:"bytes,1,rep,name=action_results,json=actionResults,proto3" json:"action_results,omitempty"` // CAS blobs to delete. Blobs []*Blob `protobuf:"bytes,2,rep,name=blobs,proto3" json:"blobs,omitempty"` // True to force a 'hard' delete. // False gives the server an option to 'soft' delete them (however it may // interpret that). Hard bool `protobuf:"varint,4,opt,name=hard,proto3" json:"hard,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetActionResults ¶
func (x *DeleteRequest) GetActionResults() []*Blob
func (*DeleteRequest) GetBlobs ¶
func (x *DeleteRequest) GetBlobs() []*Blob
func (*DeleteRequest) GetHard ¶
func (x *DeleteRequest) GetHard() bool
func (*DeleteRequest) GetPrefix ¶
func (x *DeleteRequest) GetPrefix() 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 {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
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 GCClient ¶
type GCClient interface { // List provides a listing of currently stored items in the AC / CAS. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // Delete removes some items from the server. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) }
GCClient is the client API for GC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGCClient ¶
func NewGCClient(cc grpc.ClientConnInterface) GCClient
type GCServer ¶
type GCServer interface { // List provides a listing of currently stored items in the AC / CAS. List(context.Context, *ListRequest) (*ListResponse, error) // Delete removes some items from the server. Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) }
GCServer is the server API for GC service.
type ListRequest ¶
type ListRequest struct { // The prefix of blobs to list. Should be exactly two hex characters. Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetPrefix ¶
func (x *ListRequest) GetPrefix() 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 { // List of results in the AC on this server. ActionResults []*ActionResult `protobuf:"bytes,1,rep,name=action_results,json=actionResults,proto3" json:"action_results,omitempty"` // List of blobs this server stores. Blobs []*Blob `protobuf:"bytes,2,rep,name=blobs,proto3" json:"blobs,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetActionResults ¶
func (x *ListResponse) GetActionResults() []*ActionResult
func (*ListResponse) GetBlobs ¶
func (x *ListResponse) GetBlobs() []*Blob
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 UnimplementedGCServer ¶
type UnimplementedGCServer struct { }
UnimplementedGCServer can be embedded to have forward compatible implementations.
func (*UnimplementedGCServer) Delete ¶
func (*UnimplementedGCServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (*UnimplementedGCServer) List ¶
func (*UnimplementedGCServer) List(context.Context, *ListRequest) (*ListResponse, error)