chain

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChainGroup

func NewChainGroup(chains ...chain.Chainer) *chainGroup

func NewChainHop

func NewChainHop(nodes []*chain.Node, opts ...HopOption) chain.Hop

func NewRoute

func NewRoute(opts ...RouteOption) *route

Types

type Chain

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

func NewChain

func NewChain(name string, opts ...ChainOption) *Chain

func (*Chain) AddHop

func (c *Chain) AddHop(hop chain.Hop)

func (*Chain) Marker

func (c *Chain) Marker() selector.Marker

Marker implements selector.Markable interface.

func (*Chain) Metadata

func (c *Chain) Metadata() metadata.Metadata

Metadata implements metadata.Metadatable interface.

func (*Chain) Name

func (c *Chain) Name() string

func (*Chain) Route

func (c *Chain) Route(ctx context.Context, network, address string) chain.Route

type ChainOption

type ChainOption func(*ChainOptions)

func LoggerChainOption

func LoggerChainOption(logger logger.Logger) ChainOption

func MetadataChainOption

func MetadataChainOption(md metadata.Metadata) ChainOption

type ChainOptions

type ChainOptions struct {
	Metadata metadata.Metadata
	Logger   logger.Logger
}

type HopOption

type HopOption func(*HopOptions)

func BypassHopOption

func BypassHopOption(bp bypass.Bypass) HopOption

func LoggerHopOption

func LoggerHopOption(logger logger.Logger) HopOption

func SelectorHopOption

func SelectorHopOption(s selector.Selector[*chain.Node]) HopOption

type HopOptions

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

type RouteOption

type RouteOption func(*RouteOptions)

func ChainRouteOption

func ChainRouteOption(c chain.Chainer) RouteOption

type RouteOptions

type RouteOptions struct {
	Chain chain.Chainer
}

Jump to

Keyboard shortcuts

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