Documentation ¶
Index ¶
- func New(ctx context.Context, db replication.DB, opts ...replication.Option) (replication.Replication, error)
- type Atomic
- type Gossip
- func (r *Gossip) Alive(ss pb2.ReplicationService_AliveServer) error
- func (r *Gossip) Close() (err error)
- func (r *Gossip) CurrentLeader() string
- func (r *Gossip) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResponse, error)
- func (r *Gossip) Descriptors(ctx context.Context, req *pb.DescriptorsRequest) (*pb.DescriptorsResponse, error)
- func (r *Gossip) Elect(ctx context.Context)
- func (r *Gossip) Election(_ context.Context, req *pb2.Message) (*pb2.Message, error)
- func (r *Gossip) FileDescriptors(ctx context.Context, req *pb.FileDescriptorsRequest) (*pb.FileDescriptorsResponse, error)
- func (r *Gossip) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
- func (r *Gossip) HasLeader() bool
- func (r *Gossip) Init(req *pb2.InitRequest, ss pb2.ReplicationService_InitServer) error
- func (r *Gossip) IsLeader() bool
- func (r *Gossip) LeaderConn() (grpc.ClientConnInterface, bool)
- func (r *Gossip) LinearizableReads() bool
- func (r *Gossip) Mode() replication.Mode
- func (r *Gossip) NewTx(ctx context.Context) (replication.Tx, error)
- func (r *Gossip) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterResponse, error)
- func (r *Gossip) Replicate(ss pb2.ReplicationService_ReplicateServer) error
- func (r *Gossip) Set(ctx context.Context, req *pb.SetRequest) (*pb.SetResponse, error)
- func (r *Gossip) Subscribe() <-chan string
- func (r *Gossip) Tx(ss pb.ProtoDB_TxServer) error
- func (r *Gossip) Watch(req *pb.WatchRequest, ss pb.ProtoDB_WatchServer) error
- type Map
- func (m *Map[T]) Clear()
- func (m *Map[T]) Delete(key string)
- func (m *Map[T]) Keys() []string
- func (m *Map[T]) Len() int
- func (m *Map[T]) Load(key string) (value T, ok bool)
- func (m *Map[T]) Range(f func(key string, value T) bool)
- func (m *Map[T]) Store(key string, value T)
- func (m *Map[T]) Values() []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ctx context.Context, db replication.DB, opts ...replication.Option) (replication.Replication, error)
Types ¶
type Atomic ¶
type Atomic[T any] struct { // contains filtered or unexported fields }
func (*Atomic[T]) CompareAndSwap ¶
type Gossip ¶
type Gossip struct { pb2.UnsafeReplicationServiceServer pb.UnsafeProtoDBServer // contains filtered or unexported fields }
func (*Gossip) CurrentLeader ¶
func (*Gossip) Delete ¶
func (r *Gossip) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResponse, error)
func (*Gossip) Descriptors ¶
func (r *Gossip) Descriptors(ctx context.Context, req *pb.DescriptorsRequest) (*pb.DescriptorsResponse, error)
func (*Gossip) FileDescriptors ¶
func (r *Gossip) FileDescriptors(ctx context.Context, req *pb.FileDescriptorsRequest) (*pb.FileDescriptorsResponse, error)
func (*Gossip) Get ¶
func (r *Gossip) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
func (*Gossip) Init ¶
func (r *Gossip) Init(req *pb2.InitRequest, ss pb2.ReplicationService_InitServer) error
func (*Gossip) LeaderConn ¶
func (r *Gossip) LeaderConn() (grpc.ClientConnInterface, bool)
func (*Gossip) LinearizableReads ¶
func (*Gossip) Mode ¶
func (r *Gossip) Mode() replication.Mode
func (*Gossip) Register ¶
func (r *Gossip) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterResponse, error)
func (*Gossip) Replicate ¶
func (r *Gossip) Replicate(ss pb2.ReplicationService_ReplicateServer) error
func (*Gossip) Set ¶
func (r *Gossip) Set(ctx context.Context, req *pb.SetRequest) (*pb.SetResponse, error)
func (*Gossip) Watch ¶
func (r *Gossip) Watch(req *pb.WatchRequest, ss pb.ProtoDB_WatchServer) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.