syncacl

package
v0.5.19 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrUnexpectedMessageType  = errors.New("unexpected message type")
	ErrUnexpectedResponseType = errors.New("unexpected response type")
	ErrUnexpectedRequestType  = errors.New("unexpected request type")
	ErrUnknownHead            = errors.New("unknown head")
)
View Source
var (
	ErrSyncAclClosed = errors.New("sync acl is closed")
)

Functions

func NewRequest added in v0.5.0

func NewRequest(peerId, objectId, spaceId, head string, root *consensusproto.RawRecordWithId) *objectmessages.Request

Types

type InnerHeadUpdate added in v0.5.0

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

func (*InnerHeadUpdate) Heads added in v0.5.0

func (h *InnerHeadUpdate) Heads() []string

func (*InnerHeadUpdate) Marshall added in v0.5.0

func (h *InnerHeadUpdate) Marshall(data objectmessages.ObjectMeta) ([]byte, error)

func (*InnerHeadUpdate) MsgSize added in v0.5.0

func (h *InnerHeadUpdate) MsgSize() uint64

func (*InnerHeadUpdate) Prepare added in v0.5.0

func (h *InnerHeadUpdate) Prepare() error

type InnerRequest added in v0.5.0

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

func (*InnerRequest) Marshall added in v0.5.0

func (r *InnerRequest) Marshall() ([]byte, error)

func (*InnerRequest) MsgSize added in v0.5.0

func (r *InnerRequest) MsgSize() uint64

type RequestFactory added in v0.2.15

type RequestFactory interface {
	CreateHeadUpdate(l list.AclList, added []*consensusproto.RawRecordWithId) (headUpdate *objectmessages.HeadUpdate, err error)
	CreateFullSyncRequest(peerId string, l list.AclList) *objectmessages.Request
	CreateFullSyncResponse(l list.AclList, theirHead string) (resp *response.Response, err error)
}

func NewRequestFactory added in v0.2.15

func NewRequestFactory(spaceId string) RequestFactory

type SyncAcl

type SyncAcl interface {
	app.ComponentRunnable
	list.AclList
	syncdeps.ObjectSyncHandler
	SetHeadUpdater(updater headupdater.HeadUpdater)
	SyncWithPeer(ctx context.Context, p peer.Peer) (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(ctx context.Context, headUpdate *objectmessages.HeadUpdate) error
	QueueRequest(ctx context.Context, req syncdeps.Request) (err error)
}

func NewSyncClient added in v0.2.15

func NewSyncClient(spaceId string, syncService sync.SyncService) SyncClient

Directories

Path Synopsis
Package mock_syncacl is a generated GoMock package.
Package mock_syncacl is a generated GoMock package.

Jump to

Keyboard shortcuts

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