node

package
v0.0.0-...-817dee4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServices

func NewServices(params ServicesParams) service.Services

Types

type Node

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

func DefaultNode

func DefaultNode(config *config.NodeConfig) *Node

func NewNode

func NewNode(config *config.NodeConfig, services service.Services) *Node

func (*Node) Config

func (n *Node) Config() *config.NodeConfig

func (*Node) Db

func (n *Node) Db() db.KVStore

func (*Node) Init

func (n *Node) Init(ctx context.Context) error

func (*Node) IsStarted

func (n *Node) IsStarted() bool

func (*Node) Logger

func (n *Node) Logger() *zap.Logger

func (*Node) NetworkId

func (n *Node) NetworkId() string

func (*Node) NodeId

func (n *Node) NodeId() *encoding.NodeId

func (*Node) Services

func (n *Node) Services() service.Services

func (*Node) Start

func (n *Node) Start(ctx context.Context) error

func (*Node) Stop

func (n *Node) Stop(ctx context.Context) error

func (*Node) WaitOnConnectedPeers

func (n *Node) WaitOnConnectedPeers()

type ServicesImpl

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

func (*ServicesImpl) All

func (s *ServicesImpl) All() []service.Service

func (*ServicesImpl) HTTP

func (s *ServicesImpl) HTTP() service.HTTPService

func (*ServicesImpl) Init

func (s *ServicesImpl) Init(ctx context.Context) error

func (*ServicesImpl) IsStarted

func (s *ServicesImpl) IsStarted() bool

func (*ServicesImpl) IsStarting

func (s *ServicesImpl) IsStarting() bool

func (*ServicesImpl) P2P

func (s *ServicesImpl) P2P() service.P2PService

func (*ServicesImpl) Registry

func (s *ServicesImpl) Registry() service.RegistryService

func (*ServicesImpl) Start

func (s *ServicesImpl) Start(ctx context.Context) error

func (*ServicesImpl) Stop

func (s *ServicesImpl) Stop(ctx context.Context) error

func (*ServicesImpl) Storage

func (s *ServicesImpl) Storage() service.StorageService

type ServicesParams

type ServicesParams struct {
	P2P      service.P2PService
	Registry service.RegistryService
	HTTP     service.HTTPService
	Storage  service.StorageService
}

Jump to

Keyboard shortcuts

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