observer

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0, MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkNameChangeListener

type NetworkNameChangeListener func(context.Context, *pubsub.PubSub) (<-chan gpbft.NetworkName, error)

NetworkNameChangeListener returns a channel that is notified whenever the network name changes. The channel should never be closed.

type Observer

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

func New

func New(o ...Option) (*Observer, error)

func (*Observer) Start

func (o *Observer) Start(ctx context.Context) error

func (*Observer) Stop

func (o *Observer) Stop(ctx context.Context) error

type Option

type Option func(*options) error

func WithBootstrapAddrs

func WithBootstrapAddrs(addrs ...peer.AddrInfo) Option

func WithBootstrapAddrsFromString

func WithBootstrapAddrsFromString(addrs ...string) Option

func WithConnectivityCheckInterval

func WithConnectivityCheckInterval(interval time.Duration) Option

func WithConnectivityMinPeers

func WithConnectivityMinPeers(count int) Option

func WithDataSourceName

func WithDataSourceName(dataSourceName string) Option

func WithDynamicNetworkNameFromManifestProvider

func WithDynamicNetworkNameFromManifestProvider(id peer.ID) Option

func WithHost

func WithHost(h host.Host) Option

func WithMessageBufferSize

func WithMessageBufferSize(messageBufferSize int) Option

func WithNetworkNameChangeListener

func WithNetworkNameChangeListener(listener NetworkNameChangeListener) Option

func WithQueryServerListenAddress

func WithQueryServerListenAddress(addr string) Option

func WithQueryServerReadTimeout

func WithQueryServerReadTimeout(d time.Duration) Option

func WithRetention

func WithRetention(retention time.Duration) Option

func WithRotateInterval

func WithRotateInterval(d time.Duration) Option

func WithRotatePath

func WithRotatePath(path string) Option

func WithStaticNetworkName

func WithStaticNetworkName(name gpbft.NetworkName) Option

type QueryRequest

type QueryRequest struct {
	Query string `json:"Query"`
}

Jump to

Keyboard shortcuts

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