vald

package
v0.0.0-...-74e6f8a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const RW = 0600

RW grants -rw------- file permissions

View Source
const RWX = 0700

RWX grants -rwx------ file permissions

Variables

This section is empty.

Functions

func Consume

func Consume(subscriber <-chan ctypes.ResultEvent, tssMgr *tss.Mgr) jobs.Job

Consume processes all events from the given subscriber with the given function. Do not consume the same subscriber multiple times.

func ConsumeH

func ConsumeH(subscriber <-chan ctypes.ResultEvent, tssMgr *tss.Mgr) jobs.Job

func GetHealthCheckCommand

func GetHealthCheckCommand() *cobra.Command

GetHealthCheckCommand returns the command to execute a node health check

func GetValdCommand

func GetValdCommand() *cobra.Command

GetValdCommand returns the command to start vald

Types

type RWFile

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

RWFile implements the ReadWriter interface for an underlying file

func NewRWFile

func NewRWFile(path string) RWFile

NewRWFile returns a new RWFile instance for the given file path

func (RWFile) ReadAll

func (f RWFile) ReadAll() ([]byte, error)

ReadAll returns the full content of the file

func (RWFile) WriteAll

func (f RWFile) WriteAll(bz []byte) error

WriteAll writes the given bytes to a file. Creates a new fille if it does not exist, overwrites the previous content otherwise.

type ReadWriter

type ReadWriter interface {
	WriteAll([]byte) error
	ReadAll() ([]byte, error)
}

ReadWriter represents a data source/sink

type StateStore

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

StateStore manages event state persistence

func NewStateStore

func NewStateStore(rw ReadWriter) StateStore

NewStateStore returns a new StateStore instance

func (StateStore) GetState

func (s StateStore) GetState() (completed int64, err error)

GetState returns the stored block height for which all events have been published

func (StateStore) SetState

func (s StateStore) SetState(completed int64) error

SetState persists the block height for which all events have been published

Directories

Path Synopsis
tss
rpc

Jump to

Keyboard shortcuts

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