chain

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChainGroup

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

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 hop.IHop)

func (*Chain) Marker

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

Marker implements selector.Markable interface.

func (*Chain) Metadata

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

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, opts ...chain.RouteOption) chain.IRoute

type ChainOption

type ChainOption func(*ChainOptions)

func LoggerChainOption

func LoggerChainOption(logger logger.ILogger) ChainOption

func MetadataChainOption

func MetadataChainOption(md metadata.IMetaData) ChainOption

type ChainOptions

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

type RouteOption

type RouteOption func(*RouteOptions)

func ChainRouteOption

func ChainRouteOption(c chain.IChainer) RouteOption

type RouteOptions

type RouteOptions struct {
	Chain chain.IChainer
}

Jump to

Keyboard shortcuts

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