transport

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseBundleMetadata

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

BaseBundleMetadata wraps the shared data/functionality that the different transport BundleMetadata implementations- can be based on.

func NewBaseBundleMetadata

func NewBaseBundleMetadata() *BaseBundleMetadata

NewBaseBundleMetadata returns a new instance of BaseBundleMetadata.

func (*BaseBundleMetadata) MarkAsProcessed

func (metadata *BaseBundleMetadata) MarkAsProcessed()

MarkAsProcessed function that marks the metadata as processed.

func (*BaseBundleMetadata) Processed

func (metadata *BaseBundleMetadata) Processed() bool

Processed returns whether the bundle was processed or not.

type BundleMetadata

type BundleMetadata interface {
	// MarkAsProcessed function that marks the metadata as processed.
	MarkAsProcessed()
	// Processed returns whether the bundle was processed or not.
	Processed() bool
}

BundleMetadata may include metadata that relates to transport - e.g. commit offset.

type BundleRegistration

type BundleRegistration struct {
	MsgID            string
	CreateBundleFunc bundle.CreateBundleFunction
	Predicate        func() bool
}

BundleRegistration abstract the registration for bundles according to bundle key in transport layer.

type GetBundlesMetadataFunc

type GetBundlesMetadataFunc func() []BundleMetadata

GetBundlesMetadataFunc is the function to be called by committer to fetch metadata to commit.

type Transport

type Transport interface {
	// Start function starts the transport service client.
	Start()
	// Stop function stops the transport service client.
	Stop()
	// Register function registers a msgID for sync service to know how to create the bundle, and use predicate.
	Register(registration *BundleRegistration)
}

Transport is the status bridge transport layer interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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