Documentation ¶
Index ¶
- Variables
- func RegisterInternalReplServer(s grpc.ServiceRegistrar, srv InternalReplServer)
- func RegisterRepldsServer(s grpc.ServiceRegistrar, srv RepldsServer)
- type InternalReplClient
- type InternalReplServer
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetData() []byte
- func (x *Node) GetDeleted() bool
- func (x *Node) GetPath() string
- func (x *Node) GetTimestamp() *timestamp.Timestamp
- func (x *Node) GetVersion() int64
- func (n *Node) Meta() *NodeMeta
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- func (n *Node) WithData(data []byte) *Node
- func (n *Node) WithoutData() *Node
- type NodeMeta
- type NodeStateSummary
- type RepldsClient
- type RepldsServer
- type Replds_WatchClient
- type Replds_WatchServer
- type StoreRequest
- type SyncNodesRequest
- func (*SyncNodesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SyncNodesRequest) GetSummary() *NodeStateSummary
- func (*SyncNodesRequest) ProtoMessage()
- func (x *SyncNodesRequest) ProtoReflect() protoreflect.Message
- func (x *SyncNodesRequest) Reset()
- func (x *SyncNodesRequest) String() string
- type SyncNodesResponse
- func (*SyncNodesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SyncNodesResponse) GetNodes() []*Node
- func (x *SyncNodesResponse) GetPartial() bool
- func (*SyncNodesResponse) ProtoMessage()
- func (x *SyncNodesResponse) ProtoReflect() protoreflect.Message
- func (x *SyncNodesResponse) Reset()
- func (x *SyncNodesResponse) String() string
- type UnimplementedInternalReplServer
- type UnimplementedRepldsServer
- type UnsafeInternalReplServer
- type UnsafeRepldsServer
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchRequest) GetBasePath() string
- func (x *WatchRequest) GetSummary() *NodeStateSummary
- func (*WatchRequest) ProtoMessage()
- func (x *WatchRequest) ProtoReflect() protoreflect.Message
- func (x *WatchRequest) Reset()
- func (x *WatchRequest) String() string
- type WatchResponse
Constants ¶
This section is empty.
Variables ¶
var File_internal_proto protoreflect.FileDescriptor
var File_replds_proto protoreflect.FileDescriptor
var InternalRepl_ServiceDesc = grpc.ServiceDesc{ ServiceName: "replds.InternalRepl", HandlerType: (*InternalReplServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SyncNodes", Handler: _InternalRepl_SyncNodes_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal.proto", }
InternalRepl_ServiceDesc is the grpc.ServiceDesc for InternalRepl service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Replds_ServiceDesc = grpc.ServiceDesc{ ServiceName: "replds.Replds", HandlerType: (*RepldsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Store", Handler: _Replds_Store_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _Replds_Watch_Handler, ServerStreams: true, }, }, Metadata: "replds.proto", }
Replds_ServiceDesc is the grpc.ServiceDesc for Replds service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInternalReplServer ¶
func RegisterInternalReplServer(s grpc.ServiceRegistrar, srv InternalReplServer)
func RegisterRepldsServer ¶
func RegisterRepldsServer(s grpc.ServiceRegistrar, srv RepldsServer)
Types ¶
type InternalReplClient ¶
type InternalReplClient interface {
SyncNodes(ctx context.Context, in *SyncNodesRequest, opts ...grpc.CallOption) (*SyncNodesResponse, error)
}
InternalReplClient is the client API for InternalRepl 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.
func NewInternalReplClient ¶
func NewInternalReplClient(cc grpc.ClientConnInterface) InternalReplClient
type InternalReplServer ¶
type InternalReplServer interface { SyncNodes(context.Context, *SyncNodesRequest) (*SyncNodesResponse, error) // contains filtered or unexported methods }
InternalReplServer is the server API for InternalRepl service. All implementations must embed UnimplementedInternalReplServer for forward compatibility
type Node ¶
type Node struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` Deleted bool `protobuf:"varint,3,opt,name=deleted,proto3" json:"deleted,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` Timestamp *timestamp.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` //string origin = 6; // contains filtered or unexported fields }
The Node represents the fundamental object stored in the database. Node paths are organized in a hierarchical tree, like a filesystem.
func (*Node) Descriptor
deprecated
func (*Node) GetDeleted ¶
func (*Node) GetTimestamp ¶
func (*Node) GetVersion ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
func (*Node) WithoutData ¶
type NodeMeta ¶
type NodeMeta struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
func (*NodeMeta) Descriptor
deprecated
func (*NodeMeta) GetVersion ¶
func (*NodeMeta) ProtoMessage ¶
func (*NodeMeta) ProtoMessage()
func (*NodeMeta) ProtoReflect ¶
func (x *NodeMeta) ProtoReflect() protoreflect.Message
type NodeStateSummary ¶
type NodeStateSummary struct { NodeMeta []*NodeMeta `protobuf:"bytes,1,rep,name=node_meta,json=nodeMeta,proto3" json:"node_meta,omitempty"` // contains filtered or unexported fields }
A summary of the local state of a replication tree.
func (*NodeStateSummary) Descriptor
deprecated
func (*NodeStateSummary) Descriptor() ([]byte, []int)
Deprecated: Use NodeStateSummary.ProtoReflect.Descriptor instead.
func (*NodeStateSummary) GetNodeMeta ¶
func (x *NodeStateSummary) GetNodeMeta() []*NodeMeta
func (*NodeStateSummary) ProtoMessage ¶
func (*NodeStateSummary) ProtoMessage()
func (*NodeStateSummary) ProtoReflect ¶
func (x *NodeStateSummary) ProtoReflect() protoreflect.Message
func (*NodeStateSummary) Reset ¶
func (x *NodeStateSummary) Reset()
func (*NodeStateSummary) String ¶
func (x *NodeStateSummary) String() string
type RepldsClient ¶
type RepldsClient interface { // Store one or more nodes on the database. Store(ctx context.Context, in *StoreRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Watch allows for incremental asynchronous replication of parts of // the tree (watchers). Since there is no global state, the sync + // update algorithm only works within a single streaming connection. Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Replds_WatchClient, error) }
RepldsClient is the client API for Replds 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.
func NewRepldsClient ¶
func NewRepldsClient(cc grpc.ClientConnInterface) RepldsClient
type RepldsServer ¶
type RepldsServer interface { // Store one or more nodes on the database. Store(context.Context, *StoreRequest) (*empty.Empty, error) // Watch allows for incremental asynchronous replication of parts of // the tree (watchers). Since there is no global state, the sync + // update algorithm only works within a single streaming connection. Watch(*WatchRequest, Replds_WatchServer) error // contains filtered or unexported methods }
RepldsServer is the server API for Replds service. All implementations must embed UnimplementedRepldsServer for forward compatibility
type Replds_WatchClient ¶
type Replds_WatchClient interface { Recv() (*WatchResponse, error) grpc.ClientStream }
type Replds_WatchServer ¶
type Replds_WatchServer interface { Send(*WatchResponse) error grpc.ServerStream }
type StoreRequest ¶
type StoreRequest struct { Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*StoreRequest) Descriptor
deprecated
func (*StoreRequest) Descriptor() ([]byte, []int)
Deprecated: Use StoreRequest.ProtoReflect.Descriptor instead.
func (*StoreRequest) GetNodes ¶
func (x *StoreRequest) GetNodes() []*Node
func (*StoreRequest) ProtoMessage ¶
func (*StoreRequest) ProtoMessage()
func (*StoreRequest) ProtoReflect ¶
func (x *StoreRequest) ProtoReflect() protoreflect.Message
func (*StoreRequest) Reset ¶
func (x *StoreRequest) Reset()
func (*StoreRequest) String ¶
func (x *StoreRequest) String() string
type SyncNodesRequest ¶
type SyncNodesRequest struct { Summary *NodeStateSummary `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"` // contains filtered or unexported fields }
func (*SyncNodesRequest) Descriptor
deprecated
func (*SyncNodesRequest) Descriptor() ([]byte, []int)
Deprecated: Use SyncNodesRequest.ProtoReflect.Descriptor instead.
func (*SyncNodesRequest) GetSummary ¶
func (x *SyncNodesRequest) GetSummary() *NodeStateSummary
func (*SyncNodesRequest) ProtoMessage ¶
func (*SyncNodesRequest) ProtoMessage()
func (*SyncNodesRequest) ProtoReflect ¶
func (x *SyncNodesRequest) ProtoReflect() protoreflect.Message
func (*SyncNodesRequest) Reset ¶
func (x *SyncNodesRequest) Reset()
func (*SyncNodesRequest) String ¶
func (x *SyncNodesRequest) String() string
type SyncNodesResponse ¶
type SyncNodesResponse struct { Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` Partial bool `protobuf:"varint,2,opt,name=partial,proto3" json:"partial,omitempty"` // contains filtered or unexported fields }
func (*SyncNodesResponse) Descriptor
deprecated
func (*SyncNodesResponse) Descriptor() ([]byte, []int)
Deprecated: Use SyncNodesResponse.ProtoReflect.Descriptor instead.
func (*SyncNodesResponse) GetNodes ¶
func (x *SyncNodesResponse) GetNodes() []*Node
func (*SyncNodesResponse) GetPartial ¶
func (x *SyncNodesResponse) GetPartial() bool
func (*SyncNodesResponse) ProtoMessage ¶
func (*SyncNodesResponse) ProtoMessage()
func (*SyncNodesResponse) ProtoReflect ¶
func (x *SyncNodesResponse) ProtoReflect() protoreflect.Message
func (*SyncNodesResponse) Reset ¶
func (x *SyncNodesResponse) Reset()
func (*SyncNodesResponse) String ¶
func (x *SyncNodesResponse) String() string
type UnimplementedInternalReplServer ¶
type UnimplementedInternalReplServer struct { }
UnimplementedInternalReplServer must be embedded to have forward compatible implementations.
func (UnimplementedInternalReplServer) SyncNodes ¶
func (UnimplementedInternalReplServer) SyncNodes(context.Context, *SyncNodesRequest) (*SyncNodesResponse, error)
type UnimplementedRepldsServer ¶
type UnimplementedRepldsServer struct { }
UnimplementedRepldsServer must be embedded to have forward compatible implementations.
func (UnimplementedRepldsServer) Store ¶
func (UnimplementedRepldsServer) Store(context.Context, *StoreRequest) (*empty.Empty, error)
func (UnimplementedRepldsServer) Watch ¶
func (UnimplementedRepldsServer) Watch(*WatchRequest, Replds_WatchServer) error
type UnsafeInternalReplServer ¶
type UnsafeInternalReplServer interface {
// contains filtered or unexported methods
}
UnsafeInternalReplServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternalReplServer will result in compilation errors.
type UnsafeRepldsServer ¶
type UnsafeRepldsServer interface {
// contains filtered or unexported methods
}
UnsafeRepldsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RepldsServer will result in compilation errors.
type WatchRequest ¶
type WatchRequest struct { BasePath string `protobuf:"bytes,1,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` Summary *NodeStateSummary `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` // contains filtered or unexported fields }
func (*WatchRequest) Descriptor
deprecated
func (*WatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
func (*WatchRequest) GetBasePath ¶
func (x *WatchRequest) GetBasePath() string
func (*WatchRequest) GetSummary ¶
func (x *WatchRequest) GetSummary() *NodeStateSummary
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) ProtoReflect ¶
func (x *WatchRequest) ProtoReflect() protoreflect.Message
func (*WatchRequest) Reset ¶
func (x *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (x *WatchRequest) String() string
type WatchResponse ¶
type WatchResponse struct { Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*WatchResponse) Descriptor
deprecated
func (*WatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use WatchResponse.ProtoReflect.Descriptor instead.
func (*WatchResponse) GetNodes ¶
func (x *WatchResponse) GetNodes() []*Node
func (*WatchResponse) ProtoMessage ¶
func (*WatchResponse) ProtoMessage()
func (*WatchResponse) ProtoReflect ¶
func (x *WatchResponse) ProtoReflect() protoreflect.Message
func (*WatchResponse) Reset ¶
func (x *WatchResponse) Reset()
func (*WatchResponse) String ¶
func (x *WatchResponse) String() string