gossip

package
v0.0.0-...-9753c4d Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Atomic

type Atomic[T any] struct {
	// contains filtered or unexported fields
}

func NewAtomic

func NewAtomic[T any](value T) *Atomic[T]

func (*Atomic[T]) CompareAndSwap

func (a *Atomic[T]) CompareAndSwap(old, new T) bool

func (*Atomic[T]) Load

func (a *Atomic[T]) Load() T

func (*Atomic[T]) Store

func (a *Atomic[T]) Store(value T)

func (*Atomic[T]) Swap

func (a *Atomic[T]) Swap(value T) T

type Gossip

type Gossip struct {
	pb2.UnsafeReplicationServiceServer
	pb.UnsafeProtoDBServer
	// contains filtered or unexported fields
}

func (*Gossip) Alive

func (*Gossip) Close

func (r *Gossip) Close() (err error)

func (*Gossip) CurrentLeader

func (r *Gossip) CurrentLeader() string

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) Elect

func (r *Gossip) Elect(ctx context.Context)

func (*Gossip) Election

func (r *Gossip) Election(_ context.Context, req *pb2.Message) (*pb2.Message, 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) HasLeader

func (r *Gossip) HasLeader() bool

func (*Gossip) Init

func (*Gossip) IsLeader

func (r *Gossip) IsLeader() bool

func (*Gossip) LeaderConn

func (r *Gossip) LeaderConn() (grpc.ClientConnInterface, bool)

func (*Gossip) LinearizableReads

func (r *Gossip) LinearizableReads() bool

func (*Gossip) Mode

func (r *Gossip) Mode() replication.Mode

func (*Gossip) NewTx

func (r *Gossip) NewTx(ctx context.Context) (replication.Tx, error)

func (*Gossip) Register

func (r *Gossip) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterResponse, error)

func (*Gossip) Replicate

func (*Gossip) Set

func (r *Gossip) Set(ctx context.Context, req *pb.SetRequest) (*pb.SetResponse, error)

func (*Gossip) Subscribe

func (r *Gossip) Subscribe() <-chan string

func (*Gossip) Tx

func (r *Gossip) Tx(ss pb.ProtoDB_TxServer) error

func (*Gossip) Watch

func (r *Gossip) Watch(req *pb.WatchRequest, ss pb.ProtoDB_WatchServer) error

type Map

type Map[T any] struct {
	// contains filtered or unexported fields
}

func (*Map[T]) Clear

func (m *Map[T]) Clear()

func (*Map[T]) Delete

func (m *Map[T]) Delete(key string)

func (*Map[T]) Keys

func (m *Map[T]) Keys() []string

func (*Map[T]) Len

func (m *Map[T]) Len() int

func (*Map[T]) Load

func (m *Map[T]) Load(key string) (value T, ok bool)

func (*Map[T]) Range

func (m *Map[T]) Range(f func(key string, value T) bool)

func (*Map[T]) Store

func (m *Map[T]) Store(key string, value T)

func (*Map[T]) Values

func (m *Map[T]) Values() []T

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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