Documentation ¶
Index ¶
- Variables
- func NewLoadBalanceFullNodeRPCV1(ctx context.Context, addrs []string, requestHeaders []http.Header) (v1api.FullNode, jsonrpc.ClientCloser, error)
- func NewLoadBalanceMergeClient(ctx context.Context, addrs []string, requestHeaders []http.Header, ...) (jsonrpc.ClientCloser, error)
- type Coordinator
- func (c *Coordinator) ChainNotify(ctx context.Context) (<-chan []*api.HeadChange, error)
- func (c *Coordinator) MpoolPushMessage(context context.Context, msg *types.Message, spec *api.MessageSendSpec) (*types.SignedMessage, error)
- func (c *Coordinator) RunNode(ctx context.Context, addr string, header http.Header, opt NodeOption) error
- func (c *Coordinator) RunNodesHeightChecker(ctx context.Context, genesis *types.TipSet)
- func (c *Coordinator) Select() (v1api.FullNode, error)
- func (c *Coordinator) Start(ctx context.Context) context.CancelFunc
- type Local
- type MajorMinorVersion
- type Node
- type NodeOption
- type Selector
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoNodeAvailable = fmt.Errorf("no node available")
)
common errors
Functions ¶
Types ¶
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func NewCoordinator ¶
func NewCoordinator() (*Coordinator, error)
func (*Coordinator) ChainNotify ¶
func (c *Coordinator) ChainNotify(ctx context.Context) (<-chan []*api.HeadChange, error)
ChainNotify impls api.FullNode.ChainNotify
func (*Coordinator) MpoolPushMessage ¶
func (c *Coordinator) MpoolPushMessage(context context.Context, msg *types.Message, spec *api.MessageSendSpec) (*types.SignedMessage, error)
func (*Coordinator) RunNode ¶
func (c *Coordinator) RunNode(ctx context.Context, addr string, header http.Header, opt NodeOption) error
func (*Coordinator) RunNodesHeightChecker ¶
func (c *Coordinator) RunNodesHeightChecker(ctx context.Context, genesis *types.TipSet)
func (*Coordinator) Start ¶
func (c *Coordinator) Start(ctx context.Context) context.CancelFunc
Start starts the coordinate loop
type Local ¶
type Local interface { // ChainNotify returns channel with chain head updates. // First message is guaranteed to be of len == 1, and type == 'current'. ChainNotify(context.Context) (<-chan []*api.HeadChange, error) // Signed message and Propagating the signed message to all live nodes MpoolPushMessage(context.Context, *types.Message, *api.MessageSendSpec) (*types.SignedMessage, error) }
type MajorMinorVersion ¶
type MajorMinorVersion struct {
// contains filtered or unexported fields
}
type NodeOption ¶
type NodeOption struct { ReListenMinInterval time.Duration ReListenMaxInterval time.Duration APITimeout time.Duration }
NodeOption is for node configuration
func DefaultNodeOption ¶
func DefaultNodeOption() NodeOption
DefaultNodeOption returns default options
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
func (*Selector) GetAllLiveNodes ¶
func (*Selector) StopAllNode ¶
func (s *Selector) StopAllNode()
Click to show internal directories.
Click to hide internal directories.