ipcs

package
v1.7.16 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultBaseURL can be used as a reasonable default value for the base URL
	DefaultBaseURL = "/tmp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainIPCs

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

ChainIPCs maintains IPCs for a set of chains

func NewChainIPCs

func NewChainIPCs(log logging.Logger, path string, networkID uint32, consensusAcceptorGroup, decisionAcceptorGroup snow.AcceptorGroup, defaultChainIDs []ids.ID) (*ChainIPCs, error)

NewChainIPCs creates a new *ChainIPCs that writes consensus and decision events to IPC sockets

func (*ChainIPCs) GetPublishedBlockchains added in v1.1.4

func (cipcs *ChainIPCs) GetPublishedBlockchains() []ids.ID

GetPublishedBlockchains returns the chains that are currently being published

func (*ChainIPCs) Publish

func (cipcs *ChainIPCs) Publish(chainID ids.ID) (*EventSockets, error)

Publish creates a set of eventSockets for the given chainID

func (*ChainIPCs) Shutdown added in v1.0.6

func (cipcs *ChainIPCs) Shutdown() error

func (*ChainIPCs) Unpublish

func (cipcs *ChainIPCs) Unpublish(chainID ids.ID) (bool, error)

Unpublish stops the eventSocket for the given chain if it exists. It returns whether or not the socket existed and errors when trying to close it

type EventSockets

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

EventSockets is a set of named eventSockets

func (*EventSockets) Accept

func (ipcs *EventSockets) Accept(ctx *snow.ConsensusContext, containerID ids.ID, container []byte) error

Accept delivers a message to the underlying eventSockets

func (*EventSockets) ConsensusURL

func (ipcs *EventSockets) ConsensusURL() string

ConsensusURL returns the URL of socket receiving consensus events

func (*EventSockets) DecisionsURL

func (ipcs *EventSockets) DecisionsURL() string

DecisionsURL returns the URL of socket receiving decisions events

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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