raftstorage

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplicaStorage

type ReplicaStorage struct {
	app.Runner
	// contains filtered or unexported fields
}

func NewReplicaStorage

func NewReplicaStorage(myAddress string, serviceName string, redisClient *redis.Client) *ReplicaStorage

func (*ReplicaStorage) GetMyAddress

func (rs *ReplicaStorage) GetMyAddress() string

func (*ReplicaStorage) GetReplicas

func (rs *ReplicaStorage) GetReplicas() (replicas []string, err error)

type Storage

type Storage interface {
	GetMyAddress() string
	GetReplicas() ([]string, error)
	app.Runner
}

func NewDummyStorage

func NewDummyStorage(myAddress string, allAddresses ...string) Storage

Jump to

Keyboard shortcuts

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