context

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootContext

type RootContext struct {
	// Config and instance of the configuration object
	Config *config.Config
	// Replicas instance of the ReplicaStore which contains information of all the replicas
	Replicas *types.ReplicaStore
	// LogStore which stores the log messages sent by the replicas
	LogStore *types.ReplicaLogStore
	// MessageQueue stores the messages that are _intercepted_ as a queue
	MessageQueue *types.MessageQueue
	// MessageStore stores the messages that are _intercepted_ as a map
	MessageStore *types.MessageStore
	// EventQueue stores the events sent by the replicas as a queue
	EventQueue *types.EventQueue
	// LogQueue stores the log messages sent by the replicas as a queue
	LogQueue *types.ReplicaLogQueue
	// TimeoutStore stores the timeouts that are dispatched by the replica and contains the strategy
	TimeoutStore *types.TimeoutStore
	// Counter is a thread safe monotonic integer counter
	Counter *util.Counter
	// Logger for logging purposes
	Logger *log.Logger
}

RootContext stores the context of the scheduler

func NewRootContext

func NewRootContext(config *config.Config, logger *log.Logger) *RootContext

NewRootContext creates an instance of the RootContext from the configuration

func (*RootContext) Reset

func (c *RootContext) Reset()

Reset implements Service

func (*RootContext) Start

func (c *RootContext) Start()

Start implements Service and initializes the queues

func (*RootContext) Stop

func (c *RootContext) Stop()

Stop implements Service and terminates the queues

Jump to

Keyboard shortcuts

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