finality

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRequestTimeout = 30 * time.Second

Variables

View Source
var ErrInvalidAddress = fmt.Errorf("empty address")

Functions

func GrpcClient added in v0.7.0

func GrpcClient(c *Config) (*grpc.ClientConn, error)

func WithConnectionTime added in v0.7.0

func WithConnectionTime(timeout time.Duration) grpc.DialOption

func WithTLS added in v0.7.0

func WithTLS(endpoint Endpoint) grpc.DialOption

Types

type Config added in v0.7.0

type Config struct {
	Endpoints      []Endpoint    `yaml:"endpoints,omitempty"`
	RequestTimeout time.Duration `yaml:"requestTimeout,omitempty"`
}

func NewConfig added in v0.7.0

func NewConfig(configService ConfigService) (*Config, error)

type ConfigService added in v0.7.0

type ConfigService interface {
	UnmarshalKey(key string, rawVal interface{}) error
}

type Endpoint added in v0.7.0

type Endpoint struct {
	Address               string        `yaml:"address,omitempty"`
	ConnectionTimeout     time.Duration `yaml:"connectionTimeout,omitempty"`
	TLSEnabled            bool          `yaml:"tlsEnabled,omitempty"`
	TLSRootCertFile       string        `yaml:"tlsRootCertFile,omitempty"`
	TLSServerNameOverride string        `yaml:"tlsServerNameOverride,omitempty"`
}

type ListenerManager

type ListenerManager interface {
	AddFinalityListener(txID driver.TxID, listener fabric.FinalityListener) error
	RemoveFinalityListener(txID driver.TxID, listener fabric.FinalityListener) error
	Listen(ctx context.Context) error
}

func GetListenerManager

func GetListenerManager(ctx context.Context, sp services.Provider, network, channel string) (ListenerManager, error)

type ListenerManagerProvider

type ListenerManagerProvider interface {
	NewManager(ctx context.Context, network, channel string) (ListenerManager, error)
}

func NewListenerManagerProvider

func NewListenerManagerProvider(fnsp *fabric.NetworkServiceProvider, configProvider config.Provider) ListenerManagerProvider

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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