proto

package
v0.0.0-...-afa4d9b Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_proto protoreflect.FileDescriptor
View Source
var File_replds_proto protoreflect.FileDescriptor
View Source
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)

View Source
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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetData

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

func (*Node) GetDeleted

func (x *Node) GetDeleted() bool

func (*Node) GetPath

func (x *Node) GetPath() string

func (*Node) GetTimestamp

func (x *Node) GetTimestamp() *timestamp.Timestamp

func (*Node) GetVersion

func (x *Node) GetVersion() int64

func (*Node) Meta

func (n *Node) Meta() *NodeMeta

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

func (*Node) WithData

func (n *Node) WithData(data []byte) *Node

func (*Node) WithoutData

func (n *Node) WithoutData() *Node

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) Descriptor() ([]byte, []int)

Deprecated: Use NodeMeta.ProtoReflect.Descriptor instead.

func (*NodeMeta) GetPath

func (x *NodeMeta) GetPath() string

func (*NodeMeta) GetVersion

func (x *NodeMeta) GetVersion() int64

func (*NodeMeta) ProtoMessage

func (*NodeMeta) ProtoMessage()

func (*NodeMeta) ProtoReflect

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

func (*NodeMeta) Reset

func (x *NodeMeta) Reset()

func (*NodeMeta) String

func (x *NodeMeta) String() string

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

type UnimplementedRepldsServer

type UnimplementedRepldsServer struct {
}

UnimplementedRepldsServer must be embedded to have forward compatible implementations.

func (UnimplementedRepldsServer) Store

func (UnimplementedRepldsServer) Watch

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

Jump to

Keyboard shortcuts

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