Documentation
¶
Overview ¶
Package wire is a generated protocol buffer package.
It is generated from these files:
bazil.org/bazil/peer/wire/peer.proto
It has these top-level messages:
PingRequest PingResponse ObjectPutRequest ObjectPutResponse ObjectGetRequest ObjectGetResponse VolumeConnectRequest VolumeConnectResponse VolumeSyncPullRequest VolumeSyncPullItem Dirent File Dir Tombstone
Index ¶
- Variables
- func RegisterPeerServer(s *grpc.Server, srv PeerServer)
- type Dir
- type Dirent
- type File
- type ObjectGetRequest
- type ObjectGetResponse
- type ObjectPutRequest
- type ObjectPutResponse
- type PeerClient
- type PeerServer
- type Peer_ObjectGetClient
- type Peer_ObjectGetServer
- type Peer_ObjectPutClient
- type Peer_ObjectPutServer
- type Peer_VolumeSyncPullClient
- type Peer_VolumeSyncPullServer
- type PingRequest
- type PingResponse
- type Tombstone
- type VolumeConnectRequest
- type VolumeConnectResponse
- type VolumeSyncPullItem
- type VolumeSyncPullItem_Error
- type VolumeSyncPullRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var VolumeSyncPullItem_Error_name = map[int32]string{
0: "SUCCESS",
1: "NOT_A_DIRECTORY",
}
View Source
var VolumeSyncPullItem_Error_value = map[string]int32{
"SUCCESS": 0,
"NOT_A_DIRECTORY": 1,
}
Functions ¶
func RegisterPeerServer ¶
func RegisterPeerServer(s *grpc.Server, srv PeerServer)
Types ¶
type Dirent ¶
type Dirent struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` File *File `protobuf:"bytes,2,opt,name=file" json:"file,omitempty"` Dir *Dir `protobuf:"bytes,3,opt,name=dir" json:"dir,omitempty"` Tombstone *Tombstone `protobuf:"bytes,5,opt,name=tombstone" json:"tombstone,omitempty"` Clock []byte `protobuf:"bytes,4,opt,name=clock,proto3" json:"clock,omitempty"` }
func (*Dirent) GetTombstone ¶
func (*Dirent) ProtoMessage ¶
func (*Dirent) ProtoMessage()
type File ¶
type File struct {
Manifest *bazil_cas.Manifest `protobuf:"bytes,1,opt,name=manifest" json:"manifest,omitempty"`
}
func (*File) GetManifest ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
type ObjectGetRequest ¶
type ObjectGetRequest struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (*ObjectGetRequest) ProtoMessage ¶
func (*ObjectGetRequest) ProtoMessage()
func (*ObjectGetRequest) Reset ¶
func (m *ObjectGetRequest) Reset()
func (*ObjectGetRequest) String ¶
func (m *ObjectGetRequest) String() string
type ObjectGetResponse ¶
type ObjectGetResponse struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (*ObjectGetResponse) ProtoMessage ¶
func (*ObjectGetResponse) ProtoMessage()
func (*ObjectGetResponse) Reset ¶
func (m *ObjectGetResponse) Reset()
func (*ObjectGetResponse) String ¶
func (m *ObjectGetResponse) String() string
type ObjectPutRequest ¶
type ObjectPutRequest struct { // Only set in the first streamed message. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
func (*ObjectPutRequest) ProtoMessage ¶
func (*ObjectPutRequest) ProtoMessage()
func (*ObjectPutRequest) Reset ¶
func (m *ObjectPutRequest) Reset()
func (*ObjectPutRequest) String ¶
func (m *ObjectPutRequest) String() string
type ObjectPutResponse ¶
type ObjectPutResponse struct { }
func (*ObjectPutResponse) ProtoMessage ¶
func (*ObjectPutResponse) ProtoMessage()
func (*ObjectPutResponse) Reset ¶
func (m *ObjectPutResponse) Reset()
func (*ObjectPutResponse) String ¶
func (m *ObjectPutResponse) String() string
type PeerClient ¶
type PeerClient interface { Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) ObjectPut(ctx context.Context, opts ...grpc.CallOption) (Peer_ObjectPutClient, error) ObjectGet(ctx context.Context, in *ObjectGetRequest, opts ...grpc.CallOption) (Peer_ObjectGetClient, error) VolumeConnect(ctx context.Context, in *VolumeConnectRequest, opts ...grpc.CallOption) (*VolumeConnectResponse, error) VolumeSyncPull(ctx context.Context, in *VolumeSyncPullRequest, opts ...grpc.CallOption) (Peer_VolumeSyncPullClient, error) }
func NewPeerClient ¶
func NewPeerClient(cc *grpc.ClientConn) PeerClient
type PeerServer ¶
type PeerServer interface { Ping(context.Context, *PingRequest) (*PingResponse, error) ObjectPut(Peer_ObjectPutServer) error ObjectGet(*ObjectGetRequest, Peer_ObjectGetServer) error VolumeConnect(context.Context, *VolumeConnectRequest) (*VolumeConnectResponse, error) VolumeSyncPull(*VolumeSyncPullRequest, Peer_VolumeSyncPullServer) error }
type Peer_ObjectGetClient ¶
type Peer_ObjectGetClient interface { Recv() (*ObjectGetResponse, error) grpc.ClientStream }
type Peer_ObjectGetServer ¶
type Peer_ObjectGetServer interface { Send(*ObjectGetResponse) error grpc.ServerStream }
type Peer_ObjectPutClient ¶
type Peer_ObjectPutClient interface { Send(*ObjectPutRequest) error CloseAndRecv() (*ObjectPutResponse, error) grpc.ClientStream }
type Peer_ObjectPutServer ¶
type Peer_ObjectPutServer interface { SendAndClose(*ObjectPutResponse) error Recv() (*ObjectPutRequest, error) grpc.ServerStream }
type Peer_VolumeSyncPullClient ¶
type Peer_VolumeSyncPullClient interface { Recv() (*VolumeSyncPullItem, error) grpc.ClientStream }
type Peer_VolumeSyncPullServer ¶
type Peer_VolumeSyncPullServer interface { Send(*VolumeSyncPullItem) error grpc.ServerStream }
type PingRequest ¶
type PingRequest struct { }
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) Reset ¶
func (m *PingRequest) Reset()
func (*PingRequest) String ¶
func (m *PingRequest) String() string
type PingResponse ¶
type PingResponse struct { }
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) Reset ¶
func (m *PingResponse) Reset()
func (*PingResponse) String ¶
func (m *PingResponse) String() string
type Tombstone ¶
type Tombstone struct { }
func (*Tombstone) ProtoMessage ¶
func (*Tombstone) ProtoMessage()
type VolumeConnectRequest ¶
type VolumeConnectRequest struct {
VolumeName string `protobuf:"bytes,1,opt,name=volumeName" json:"volumeName,omitempty"`
}
func (*VolumeConnectRequest) ProtoMessage ¶
func (*VolumeConnectRequest) ProtoMessage()
func (*VolumeConnectRequest) Reset ¶
func (m *VolumeConnectRequest) Reset()
func (*VolumeConnectRequest) String ¶
func (m *VolumeConnectRequest) String() string
type VolumeConnectResponse ¶
type VolumeConnectResponse struct {
VolumeID []byte `protobuf:"bytes,1,opt,name=volumeID,proto3" json:"volumeID,omitempty"`
}
func (*VolumeConnectResponse) ProtoMessage ¶
func (*VolumeConnectResponse) ProtoMessage()
func (*VolumeConnectResponse) Reset ¶
func (m *VolumeConnectResponse) Reset()
func (*VolumeConnectResponse) String ¶
func (m *VolumeConnectResponse) String() string
type VolumeSyncPullItem ¶
type VolumeSyncPullItem struct { // This is used to work around gRPC fixed error codes and error // strings. // // It can only be present in the first streamed message. // All other fields are to be ignored. Error VolumeSyncPullItem_Error `protobuf:"varint,1,opt,name=error,enum=bazil.peer.VolumeSyncPullItem_Error" json:"error,omitempty"` // Logical clocks in Dirents use small integers to identify peers. // This map connects those identifiers to globally unique peer // public keys. // // This can only be present in the first streamed message. Peers map[uint32][]byte `` /* 138-byte string literal not displayed */ // Logical clock for the directory itself. // // This can only be present in the first streamed message. DirClock []byte `protobuf:"bytes,4,opt,name=dirClock,proto3" json:"dirClock,omitempty"` // Directory entries. More entries may follow in later streamed // messages. The entries are required to be in lexicographical // (bytewise) order, across all messages. Children []*Dirent `protobuf:"bytes,3,rep,name=children" json:"children,omitempty"` }
func (*VolumeSyncPullItem) GetChildren ¶
func (m *VolumeSyncPullItem) GetChildren() []*Dirent
func (*VolumeSyncPullItem) GetPeers ¶
func (m *VolumeSyncPullItem) GetPeers() map[uint32][]byte
func (*VolumeSyncPullItem) ProtoMessage ¶
func (*VolumeSyncPullItem) ProtoMessage()
func (*VolumeSyncPullItem) Reset ¶
func (m *VolumeSyncPullItem) Reset()
func (*VolumeSyncPullItem) String ¶
func (m *VolumeSyncPullItem) String() string
type VolumeSyncPullItem_Error ¶
type VolumeSyncPullItem_Error int32
const ( VolumeSyncPullItem_SUCCESS VolumeSyncPullItem_Error = 0 // The path in the request did not refer to a directory. VolumeSyncPullItem_NOT_A_DIRECTORY VolumeSyncPullItem_Error = 1 )
func (VolumeSyncPullItem_Error) String ¶
func (x VolumeSyncPullItem_Error) String() string
type VolumeSyncPullRequest ¶
type VolumeSyncPullRequest struct { VolumeID []byte `protobuf:"bytes,1,opt,name=volumeID,proto3" json:"volumeID,omitempty"` Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` }
func (*VolumeSyncPullRequest) ProtoMessage ¶
func (*VolumeSyncPullRequest) ProtoMessage()
func (*VolumeSyncPullRequest) Reset ¶
func (m *VolumeSyncPullRequest) Reset()
func (*VolumeSyncPullRequest) String ¶
func (m *VolumeSyncPullRequest) String() string
Click to show internal directories.
Click to hide internal directories.