common

package
v1.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespaceFromSubName

func GetNamespaceFromSubName(subName string) string

Types

type BatchPinParams

type BatchPinParams struct {
	UUIDs      string
	BatchHash  string
	Contexts   []string
	PayloadRef string
}

type BlockchainCallbacks

type BlockchainCallbacks interface {
	SetHandler(namespace string, handler blockchain.Callbacks)
	SetOperationalHandler(namespace string, handler core.OperationCallbacks)

	OperationUpdate(ctx context.Context, plugin core.Named, nsOpID string, status core.OpStatus, blockchainTXID, errorMessage string, opOutput fftypes.JSONObject)
	BatchPinOrNetworkAction(ctx context.Context, nsOrAction string, subInfo *SubscriptionInfo, location *fftypes.JSONAny, event *blockchain.Event, signingKey *core.VerifierRef, params *BatchPinParams) error
	BlockchainEvent(ctx context.Context, namespace string, event *blockchain.EventWithSubscription) error
}

func NewBlockchainCallbacks

func NewBlockchainCallbacks() BlockchainCallbacks

type FireflySubscriptions

type FireflySubscriptions interface {
	AddSubscription(ctx context.Context, namespace core.NamespaceRef, version int, subID string, extra interface{})
	RemoveSubscription(ctx context.Context, subID string)
	GetSubscription(subID string) *SubscriptionInfo
}

func NewFireflySubscriptions

func NewFireflySubscriptions() FireflySubscriptions

type SubscriptionInfo

type SubscriptionInfo struct {
	Version     int
	V1Namespace map[string][]string
	V2Namespace string
	Extra       interface{}
}

A single subscription on network version 1 may receive events from many remote namespaces, which in turn map to one or more local namespaces. A subscription on network version 2 is always specific to a single local namespace.

Jump to

Keyboard shortcuts

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