Versions in this module Expand all Collapse all v0 v0.0.1 Mar 27, 2024 Changes in this version + const DefaultAttributeLoadingSetting + const DefaultClusterFormationTimeout + const DefaultConcurrency + const DefaultConsensusAlgorithm + const DefaultExecutionTimeout + const DefaultHealthInterval + const DefaultRollCallTimeout + const DefaultTopic + var DefaultConfig = Config + var ErrUnsupportedMessage = errors.New("unsupported message") + type ChanData struct + Data execute.ResultMap + FunctionId string + RequestId string + Res codes.Code + Topic string + type Config struct + ClusterFormationTimeout time.Duration + Concurrency uint + DefaultConsensus consensus.Type + Execute blockless.Executor + ExecutionTimeout time.Duration + HealthInterval time.Duration + LoadAttributes bool + Role blockless.NodeRole + RollCallTimeout time.Duration + Topics []string + Workspace string + type FStore interface + Install func(address string, cid string) error + Installed func(cid string) (bool, error) + InstalledFunctions func() ([]string, error) + Sync func(cid string) error + type HandlerFunc func(context.Context, peer.ID, []byte) error + type Node struct + func New(log zerolog.Logger, host *host.Host, peerStore PeerStore, fstore FStore, ...) (*Node, error) + func (n *Node) CommunicatorAppLayer() chan []byte + func (n *Node) ExecuteFunction(ctx context.Context, req execute.Request, subgroup string) (codes.Code, string, execute.ResultMap, execute.Cluster, error) + func (n *Node) ExecutionResult(id string) (execute.Result, bool) + func (n *Node) HealthPing(ctx context.Context) + func (n *Node) ID() string + func (n *Node) PublishFunctionInstall(ctx context.Context, uri string, cid string, subgroup string) error + func (n *Node) Run(ctx context.Context) error + func (n *Node) ValidateConfig() error + type Option func(*Config) + func WithAttributeLoading(b bool) Option + func WithClusterFormationTimeout(d time.Duration) Option + func WithConcurrency(n uint) Option + func WithDefaultConsensus(c consensus.Type) Option + func WithExecutionTimeout(d time.Duration) Option + func WithExecutor(execute blockless.Executor) Option + func WithHealthInterval(d time.Duration) Option + func WithRole(role blockless.NodeRole) Option + func WithRollCallTimeout(d time.Duration) Option + func WithTopics(topics []string) Option + func WithWorkspace(path string) Option + type PeerStore interface + Store func(peer.ID, multiaddr.Multiaddr, peer.AddrInfo) error + type Store interface + GetRecord func(string, interface{}) error + SetRecord func(string, interface{}) error