Documentation
¶
Index ¶
- func GetServiceIps(services []Service) (map[string]string, error)
- type GanacheService
- type PrometheusService
- type Service
- type SimpleService
- func (s SimpleService) GetCommand() string
- func (s SimpleService) GetEnv() map[string]string
- func (s SimpleService) GetImage() string
- func (s SimpleService) GetName() string
- func (s SimpleService) GetNetwork() string
- func (s SimpleService) GetPorts() []string
- func (s SimpleService) GetVolumes() []string
- func (s SimpleService) Prepare(client ssh.Client, tn *testnet.TestNet) error
- type SysethereumService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GanacheService ¶
type GanacheService struct {
SimpleService
}
GanacheService represents the Ganache service
func (GanacheService) GetCommand ¶
func (p GanacheService) GetCommand() string
GetCommand get the ganache command line options
type PrometheusService ¶
type PrometheusService struct {
SimpleService
}
PrometheusService represents the Prometheus service
type Service ¶
type Service interface {
// Prepare prepares the service
Prepare(client ssh.Client, tn *testnet.TestNet) error
// GetName gets the name of service
GetName() string
// GetImage gets the image of service
GetImage() string
// GetEnv gets the environment variables of service
GetEnv() map[string]string
// GetNetwork gets the network of the service
GetNetwork() string
// GetPorts gets the ports published by the service
GetPorts() []string
// GetVolumes gets the volumes mounted on the service container
GetVolumes() []string
// GetCommand gets the command to run for the service with Docker.
GetCommand() string
}
Service represents a service
func RegisterGanache ¶
func RegisterGanache() Service
RegisterGanache exposes a Ganache service on the testnet.
func RegisterPrometheus ¶
func RegisterPrometheus() Service
RegisterPrometheus exposes a Prometheus service on the testnet.
func RegisterSysethereum ¶
func RegisterSysethereum() Service
RegisterSysethereum exposes a Sysethereum service on the testnet.
type SimpleService ¶
type SimpleService struct {
Name string `json:"name"`
Image string `json:"image"`
Env map[string]string `json:"env"`
Network string `json:"network"`
Ports []string `json:"ports"`
Volumes []string `json:"volumes"`
}
SimpleService represents a service for a blockchain. All env variables will be passed to the container.
func (SimpleService) GetCommand ¶
func (s SimpleService) GetCommand() string
GetCommand gets the command to run for the service with Docker.
func (SimpleService) GetEnv ¶
func (s SimpleService) GetEnv() map[string]string
GetEnv gets the environment variables of service
func (SimpleService) GetImage ¶
func (s SimpleService) GetImage() string
GetImage gets the image of service
func (SimpleService) GetName ¶
func (s SimpleService) GetName() string
GetName gets the name of service
func (SimpleService) GetNetwork ¶
func (s SimpleService) GetNetwork() string
GetNetwork gets the network of the service
func (SimpleService) GetPorts ¶
func (s SimpleService) GetPorts() []string
GetPorts gets the ports published by the service
func (SimpleService) GetVolumes ¶
func (s SimpleService) GetVolumes() []string
GetVolumes gets the volumes mounted on the service container
type SysethereumService ¶
type SysethereumService struct {
SimpleService
}
SysethereumService represents the SysethereumService service
func (SysethereumService) GetCommand ¶
func (p SysethereumService) GetCommand() string
GetCommand gets the command flags