innerring

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractProcessor

type ContractProcessor interface {
	ListenerParsers() []event.ParserInfo
	ListenerHandlers() []event.HandlerInfo
	TimersHandlers() []event.HandlerInfo
}

ContractProcessor interface defines functions for binding event producers such as event.Listener and Timers with contract processor.

type Server

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

Server is the inner ring application structure, that contains all event processors, shared variables and event handlers.

func New

func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error)

New creates instance of inner ring sever structure.

func (*Server) EpochCounter

func (s *Server) EpochCounter() uint64

EpochCounter is a getter for a global epoch counter.

func (*Server) Index added in v0.12.0

func (s *Server) Index() int32

Index is a getter for a global index of node in inner ring list. Negative index means that node is not in the inner ring list.

func (*Server) IsActive

func (s *Server) IsActive() bool

IsActive is a getter for a global active flag state.

func (*Server) SetEpochCounter

func (s *Server) SetEpochCounter(val uint64)

SetEpochCounter is a setter for contract processors to update global epoch counter.

func (*Server) Start

func (s *Server) Start(ctx context.Context, intError chan<- error) error

Start runs all event providers.

func (*Server) Stop

func (s *Server) Stop()

Stop closes all subscription channels.

Directories

Path Synopsis
processors

Jump to

Keyboard shortcuts

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