syncacl

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.acl.syncacl"

Variables

View Source
var (
	ErrMessageIsRequest    = errors.New("message is request")
	ErrMessageIsNotRequest = errors.New("message is not request")
)
View Source
var (
	ErrSyncAclClosed = errors.New("sync acl is closed")
)

Functions

This section is empty.

Types

type AclSyncProtocol added in v0.2.15

type AclSyncProtocol interface {
	HeadUpdate(ctx context.Context, senderId string, update *consensusproto.LogHeadUpdate) (request *consensusproto.LogSyncMessage, err error)
	FullSyncRequest(ctx context.Context, senderId string, request *consensusproto.LogFullSyncRequest) (response *consensusproto.LogSyncMessage, err error)
	FullSyncResponse(ctx context.Context, senderId string, response *consensusproto.LogFullSyncResponse) (err error)
}

type RequestFactory added in v0.2.15

type RequestFactory interface {
	CreateHeadUpdate(l list.AclList, added []*consensusproto.RawRecordWithId) (msg *consensusproto.LogSyncMessage)
	CreateFullSyncRequest(l list.AclList, theirHead string) (req *consensusproto.LogSyncMessage, err error)
	CreateFullSyncResponse(l list.AclList, theirHead string) (*consensusproto.LogSyncMessage, error)
}

func NewRequestFactory added in v0.2.15

func NewRequestFactory() RequestFactory

type SyncAcl

type SyncAcl interface {
	app.ComponentRunnable
	list.AclList
	syncobjectgetter.SyncObject
	SetHeadUpdater(updater headupdater.HeadUpdater)
	SyncWithPeer(ctx context.Context, peerId string) (err error)
	SetAclUpdater(updater headupdater.AclUpdater)
}

func New added in v0.2.0

func New() SyncAcl

type SyncClient added in v0.2.15

type SyncClient interface {
	RequestFactory
	Broadcast(msg *consensusproto.LogSyncMessage)
	SendUpdate(peerId string, msg *consensusproto.LogSyncMessage) (err error)
	QueueRequest(peerId string, msg *consensusproto.LogSyncMessage) (err error)
	SendRequest(ctx context.Context, peerId string, msg *consensusproto.LogSyncMessage) (reply *spacesyncproto.ObjectSyncMessage, err error)
}

func NewSyncClient added in v0.2.15

func NewSyncClient(spaceId string, requestManager requestmanager.RequestManager, peerManager peermanager.PeerManager) SyncClient

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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