Documentation
¶
Index ¶
- Constants
- Variables
- func CustomRunWithPulsar(numVirtual, numLight, numHeavy int, cb func([]string) int) int
- func CustomRunWithoutPulsar(numVirtual, numLight, numHeavy int, cb func([]string) int) int
- func DumpMetricsEnabled() bool
- func FetchAndSaveMetrics(iteration int) ([][]byte, error)
- func GetDiscoveryNodesCount() (int, error)
- func GetNodesCount() (int, error)
- func GetPulseTime() int
- func GetPulseTimeEnv() string
- func LogRotateEnabled() bool
- func Path(a ...string) string
- func RotateLogs(verbose bool)
- func Run(cb func() int) int
- func RunCloudWithConsensus(numVirtual, numLight, numHeavy uint, cb func() int) int
- func RunOnlyWithLaunchnet(t *testing.T)
- func SetVerbose(v bool)
- func WithCloudFileLogging() func(runner *CloudRunner)
- func WithDefaultLogLevel(level log.Level) func(runner *CloudRunner)
- func WithMajorityRule(num int) func(runner *CloudRunner)
- func WithMinRoles(virtual, light, heavy uint) func(runner *CloudRunner)
- func WithPrepared(virtual, light, heavy uint) func(runner *CloudRunner)
- func WithPulsarMode(mode PulsarMode) func(runner *CloudRunner)
- func WithRunning(virtual, light, heavy uint) func(runner *CloudRunner)
- type CloudRunner
- func (cr *CloudRunner) ControlledRun(cb func(helper *Helper) error) error
- func (cr *CloudRunner) PrepareConfig()
- func (cr *CloudRunner) Run(cb func([]string) int) int
- func (cr CloudRunner) SetupCloud() (func(), error)
- func (cr CloudRunner) SetupCloudCustom(pulsarMode PulsarMode) (func(), error)
- func (cr CloudRunner) SetupControlledRun() (*Helper, func(), error)
- type Helper
- func (h *Helper) AddNode(role member.PrimaryRole) reference.Global
- func (h *Helper) GetAPIAddresses() []string
- func (h *Helper) GetAdminAddresses() []string
- func (h *Helper) IncrementPulse(ctx context.Context)
- func (h *Helper) PartialPulse(ctx context.Context, packet pulsar.PulsePacket, ...)
- func (h *Helper) StopNode(role member.PrimaryRole, nodeRef reference.Global)
- func (h *Helper) SyncPulse(ctx context.Context)
- type OneShotMode
- type PulsarMode
- type User
Constants ¶
View Source
const ( HOST = "http://localhost:" AdminPort = "19002" PublicPort = "19102" HostDebug = "http://localhost:8001" TestAdminRPCUrl = "/admin-api/rpc" )
Variables ¶
View Source
var ( AdminHostPort = HOST + AdminPort TestRPCUrl = HOST + AdminPort + TestAdminRPCUrl TestRPCUrlPublic = HOST + PublicPort + "/api/rpc" TestWalletHost = "INSOLAR_FUNC_TESTWALLET_HOST" )
Functions ¶
func CustomRunWithPulsar ¶
func CustomRunWithoutPulsar ¶
func DumpMetricsEnabled ¶
func DumpMetricsEnabled() bool
LogRotateEnabled checks is log rotation enabled by environment variable.
func FetchAndSaveMetrics ¶
FetchAndSaveMetrics fetches all nodes metric endpoints and saves result to files in logs/metrics/$iteration/<node-addr>.txt files.
func GetDiscoveryNodesCount ¶
func GetNodesCount ¶
func GetPulseTime ¶
func GetPulseTime() int
func GetPulseTimeEnv ¶
func GetPulseTimeEnv() string
func LogRotateEnabled ¶
func LogRotateEnabled() bool
LogRotateEnabled checks is log rotation enabled by environment variable.
func RotateLogs ¶
func RotateLogs(verbose bool)
RotateLogs rotates launchnet logs, verbose flag enables printing what happens.
func Run ¶
Run starts launchnet before execution of callback function (cb) and stops launchnet after. Returns exit code as a result from calling callback function.
func RunCloudWithConsensus ¶
func RunOnlyWithLaunchnet ¶
func SetVerbose ¶
func SetVerbose(v bool)
func WithCloudFileLogging ¶
func WithCloudFileLogging() func(runner *CloudRunner)
func WithDefaultLogLevel ¶
func WithDefaultLogLevel(level log.Level) func(runner *CloudRunner)
func WithMajorityRule ¶
func WithMajorityRule(num int) func(runner *CloudRunner)
func WithMinRoles ¶
func WithMinRoles(virtual, light, heavy uint) func(runner *CloudRunner)
func WithPrepared ¶
func WithPrepared(virtual, light, heavy uint) func(runner *CloudRunner)
func WithPulsarMode ¶
func WithPulsarMode(mode PulsarMode) func(runner *CloudRunner)
func WithRunning ¶
func WithRunning(virtual, light, heavy uint) func(runner *CloudRunner)
Types ¶
type CloudRunner ¶
type CloudRunner struct { MinRoles cloud.NodeConfiguration Prepared cloud.NodeConfiguration Running cloud.NodeConfiguration ConfProvider *cloud.ConfigurationProvider // contains filtered or unexported fields }
func PrepareCloudRunner ¶
func PrepareCloudRunner(options ...cloudOption) *CloudRunner
func (*CloudRunner) ControlledRun ¶
func (cr *CloudRunner) ControlledRun(cb func(helper *Helper) error) error
func (*CloudRunner) PrepareConfig ¶
func (cr *CloudRunner) PrepareConfig()
func (CloudRunner) SetupCloud ¶
func (cr CloudRunner) SetupCloud() (func(), error)
func (CloudRunner) SetupCloudCustom ¶
func (cr CloudRunner) SetupCloudCustom(pulsarMode PulsarMode) (func(), error)
func (CloudRunner) SetupControlledRun ¶
func (cr CloudRunner) SetupControlledRun() (*Helper, func(), error)
type Helper ¶
type Helper struct { NodeController insapp.MultiController NetworkController *cloud.NetworkController ConfigurationProvider *cloud.ConfigurationProvider // contains filtered or unexported fields }
func (*Helper) GetAPIAddresses ¶
func (*Helper) GetAdminAddresses ¶
func (*Helper) IncrementPulse ¶
func (*Helper) PartialPulse ¶
type OneShotMode ¶
type OneShotMode int
const ( OneShotUndefined OneShotMode = iota OneShotTrue OneShotFalse )
func (OneShotMode) ToValue ¶
func (o OneShotMode) ToValue() string
Click to show internal directories.
Click to hide internal directories.