syncacl

package
v0.5.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 19 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 (
	ErrMessageIsRequest    = errors.New("message is request")
	ErrMessageIsNotRequest = errors.New("message is not request")
)
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

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)
	CreateFullSyncRequest(peerId string, l list.AclList) *objectmessages.Request
	CreateFullSyncResponse(l list.AclList, theirHead string) (resp *Response, err error)
}

func NewRequestFactory added in v0.2.15

func NewRequestFactory(spaceId string) RequestFactory

type Response

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

func (*Response) MsgSize

func (r *Response) MsgSize() uint64

func (*Response) ProtoMessage

func (r *Response) ProtoMessage() (proto.Message, error)

func (*Response) SetProtoMessage

func (r *Response) SetProtoMessage(message proto.Message) error

type SyncAcl

type SyncAcl interface {
	app.ComponentRunnable
	list.AclList
	syncdeps.ObjectSyncHandler
	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(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