services

package
v0.0.0-...-95bd726 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCaminoServiceAvailabilityChecker

func NewCaminoServiceAvailabilityChecker(timeout time.Duration) services.ServiceAvailabilityCheckerCore

NewCaminoServiceAvailabilityChecker returns a new services.ServiceAvailabilityCheckerCore to check if an CaminoService is ready

Types

type CaminoLogLevel

type CaminoLogLevel string

CaminoLogLevel specifies the log level for an Camino client

const (
	VERBOSE CaminoLogLevel = "verbo"
	DEBUG   CaminoLogLevel = "debug"
	INFO    CaminoLogLevel = "info"
)

type CaminoService

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

CaminoService implements CaminoService

func (CaminoService) GetJSONRPCSocket

func (service CaminoService) GetJSONRPCSocket() ServiceSocket

GetJSONRPCSocket implements CaminoService

func (CaminoService) GetStakingSocket

func (service CaminoService) GetStakingSocket() ServiceSocket

GetStakingSocket implements CaminoService

type CaminoServiceAvailabilityCheckerCore

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

CaminoServiceAvailabilityCheckerCore implements services.ServiceAvailabilityCheckerCore that defines the criteria for an Camino service being available

func (CaminoServiceAvailabilityCheckerCore) GetTimeout

GetTimeout implements services.AvailabilityCheckerCore

func (CaminoServiceAvailabilityCheckerCore) IsServiceUp

func (g CaminoServiceAvailabilityCheckerCore) IsServiceUp(toCheck services.Service, dependencies []services.Service) bool

IsServiceUp implements services.ServiceAvailabilityCheckerCore#IsServiceUp and returns true when the Camino healthcheck reports that the node is available

type CaminoServiceInitializerCore

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

CaminoServiceInitializerCore implements Kurtosis' services.ServiceInitializerCore used to initialize an Camino service

func NewCaminoServiceInitializerCore

func NewCaminoServiceInitializerCore(
	snowSampleSize int,
	snowQuorumSize int,
	txFee uint64,
	stakingEnabled bool,
	networkInitialTimeout time.Duration,
	additionalCLIArgs map[string]string,
	bootstrapperNodeIDs []string,
	certProvider certs.CaminoCertProvider,
	logLevel CaminoLogLevel) *CaminoServiceInitializerCore

NewCaminoServiceInitializerCore creates a new Camino service initializer core with the following parameters: Args:

snowSampleSize: Sample size for Snow consensus protocol
snowQuroumSize: Quorum size for Snow consensus protocol
stakingEnabled: Whether this node will use staking
cliArgs: A mapping of cli_arg -> cli_arg_value that will be passed as-is to the Camino node
bootstrapperNodeIDs: The node IDs of the bootstrapper nodes that this node will connect to. While this *seems* unintuitive
	why this would be required, it's because Camino doesn't actually use certs. So, to prevent against man-in-the-middle attacks,
	the user is required to manually specify the node IDs of the nodese it's connecting to.
certProvider: Provides the certs used by the Camino services generated by this core
logLevel: The loglevel that the Camino node should output at.

Returns:

An intializer core for creating Camino nodes with the specified parameers.

func (CaminoServiceInitializerCore) GetFilesToMount

func (core CaminoServiceInitializerCore) GetFilesToMount() map[string]bool

GetFilesToMount implements services.ServiceInitializerCore to declare the files used by the node

func (CaminoServiceInitializerCore) GetServiceFromIp

func (core CaminoServiceInitializerCore) GetServiceFromIp(ipAddr string) services.Service

GetServiceFromIp implements services.ServiceInitializerCore function to take the IP address of the Docker container that Kurtosis launches the Camino node inside and wrap it with our CaminoService implementation of NodeService

func (CaminoServiceInitializerCore) GetStartCommand

func (core CaminoServiceInitializerCore) GetStartCommand(mountedFileFilepaths map[string]string, ipPlaceholder string, dependencies []services.Service) ([]string, error)

GetStartCommand implements services.ServiceInitializerCore to build the command line that will be used to launch an Camino node The IP placeholder is a string that can be used in place of the IP, since we don't yet know the IP when we ask to start a new service

func (CaminoServiceInitializerCore) GetTestVolumeMountpoint

func (core CaminoServiceInitializerCore) GetTestVolumeMountpoint() string

GetTestVolumeMountpoint implements services.ServiceInitializerCore to declare the path on the Camino Docker image where the test Docker volume should be mounted on

func (CaminoServiceInitializerCore) GetUsedPorts

func (core CaminoServiceInitializerCore) GetUsedPorts() map[int]bool

GetUsedPorts implements services.ServiceInitializerCore to declare the ports used by the node

func (CaminoServiceInitializerCore) InitializeMountedFiles

func (core CaminoServiceInitializerCore) InitializeMountedFiles(osFiles map[string]*os.File, dependencies []services.Service) error

InitializeMountedFiles implementats services.ServiceInitializerCore to initialize the file needed by the node

type NodeService

type NodeService interface {
	services.Service

	// GetStakingSocket returns the socket used for communication between nodes on the network
	GetStakingSocket() ServiceSocket
}

NodeService implements the Kurtosis generic services.Service interface that represents the minimum interface for a validator node

type ServiceSocket

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

ServiceSocket ...

func NewServiceSocket

func NewServiceSocket(ipAddr string, port int) *ServiceSocket

NewServiceSocket ...

func (*ServiceSocket) GetIpAddr

func (socket *ServiceSocket) GetIpAddr() string

GetIpAddr ...

func (*ServiceSocket) GetPort

func (socket *ServiceSocket) GetPort() int

GetPort ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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