exchanger

package
v1.0.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func GenerateConfig

func GenerateConfig(opts ...Option) (*Config, error)

type Exchanger

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

func New

func New(typ, pierID string, meta *rpcx.Interchain, opts ...Option) (*Exchanger, error)

func (*Exchanger) Start

func (ex *Exchanger) Start() error

func (*Exchanger) Stop

func (ex *Exchanger) Stop() error

type IExchanger

type IExchanger interface {
	// Start starts the service of exchanger
	Start() error

	// Stop stops the service of exchanger
	Stop() error
}

type Option

type Option func(*Config)

func WithAPIServer

func WithAPIServer(apiServer *api.Server) Option

func WithAgent

func WithAgent(ag agent.Agent) Option

func WithChecker

func WithChecker(checker checker.Checker) Option

func WithExecutor

func WithExecutor(exec executor.Executor) Option

func WithMonitor

func WithMonitor(mnt monitor.Monitor) Option

func WithPeerMgr

func WithPeerMgr(mgr peermgr.PeerManager) Option

func WithStorage

func WithStorage(store storage.Storage) Option

func WithSyncer

func WithSyncer(syncer syncer.Syncer) Option

Jump to

Keyboard shortcuts

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