finality

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFabricFinality

func NewFabricFinality(channel string, network Network, hasher Hasher, waitForEventTimeout time.Duration) (*fabricFinality, error)

func NewService

func NewService(sp view2.ServiceProvider, network Network, channel string, committer Committer) (*finality, error)

Types

type Committer

type Committer interface {
	// IsFinal takes in input a transaction id and waits for its confirmation.
	IsFinal(ctx context.Context, txID string) error
}

type Config

type Config interface {
	TLSEnabled() bool
}

type Hasher

type Hasher interface {
	Hash(msg []byte) (hash []byte, err error)
}

type IsFinalInitiatorView

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

func NewIsFinalInitiatorView

func NewIsFinalInitiatorView(network, channel, txID string, recipient view.Identity, timeout time.Duration) *IsFinalInitiatorView

func (*IsFinalInitiatorView) Call

func (i *IsFinalInitiatorView) Call(context view.Context) (interface{}, error)

type IsFinalRequest

type IsFinalRequest struct {
	Network string
	Channel string
	TxID    string
	Timeout time.Duration
}

type IsFinalResponse

type IsFinalResponse struct {
	Err error
}

type Network

type Network interface {
	Name() string
	PickPeer(driver.PeerFunctionType) *grpc.ConnectionConfig
	LocalMembership() driver.LocalMembership
	Channel(id string) (driver.Channel, error)
	IdentityProvider() driver.IdentityProvider
}

Jump to

Keyboard shortcuts

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