mocksotrage

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockServer

type MockServer struct {
	// contains filtered or unexported fields
}

func NewKVServer

func NewKVServer() (svr *MockServer, err error)

func (*MockServer) Stop

func (m *MockServer) Stop()

func (*MockServer) Storage

func (m *MockServer) Storage() *clientv3.Client

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage of Syncer

func New

func New() *Storage

func (*Storage) GetData

func (s *Storage) GetData() (data *pb.SyncData)

GetData Get data from storage

func (*Storage) GetMapByCluster

func (s *Storage) GetMapByCluster(clusterName string) (mapping pb.SyncMapping)

GetMapByCluster get map by clusterName of other cluster

func (*Storage) GetMaps

func (s *Storage) GetMaps() (mapping pb.SyncMapping)

GetMaps Get maps from storage

func (*Storage) UpdateData

func (s *Storage) UpdateData(data *pb.SyncData)

UpdateData Update data to storage

func (*Storage) UpdateMapByCluster

func (s *Storage) UpdateMapByCluster(clusterName string, mapping pb.SyncMapping)

UpdateMapByCluster update map to storage by clusterName of other cluster

func (*Storage) UpdateMaps

func (s *Storage) UpdateMaps(maps pb.SyncMapping)

Jump to

Keyboard shortcuts

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