Documentation ¶
Index ¶
- func WriteConfigFile(t *testing.T, config string) string
- type KioraInstance
- func (k *KioraInstance) GetAlerts(ctx context.Context) []model.Alert
- func (k *KioraInstance) GetClusterHost() string
- func (k *KioraInstance) GetHTTPURL(path string) string
- func (k *KioraInstance) GetSilences(ctx context.Context, matchers []string) []model.Silence
- func (k *KioraInstance) IsUp(ctx context.Context) bool
- func (k *KioraInstance) SendAlert(ctx context.Context, alert model.Alert)
- func (k *KioraInstance) SendAlertAcknowledgement(ctx context.Context, ack ackRequest)
- func (k *KioraInstance) SendSilence(ctx context.Context, silence model.Silence) model.Silence
- func (k *KioraInstance) Start() *KioraInstance
- func (k *KioraInstance) Stderr() string
- func (k *KioraInstance) Stdout() string
- func (k *KioraInstance) Stop() error
- func (k *KioraInstance) WaitForExit(ctx context.Context) error
- func (k *KioraInstance) WaitTillUp(ctx context.Context) error
- func (k *KioraInstance) WithConfig(config string) *KioraInstance
- func (k *KioraInstance) WithConfigFile(configFile string) *KioraInstance
- func (k *KioraInstance) WithName(name string) *KioraInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KioraInstance ¶
type KioraInstance struct {
// contains filtered or unexported fields
}
KioraInstance wraps an instance of Kiora started as a separate process as a black box.
func NewKioraInstance ¶
func NewKioraInstance(t *testing.T, args ...string) *KioraInstance
NewKioraInstance constructs a new KioraInstance that will start a Kiora run with the given CLI args.
func StartKioraCluster ¶
func StartKioraCluster(t *testing.T, numNodes int) []*KioraInstance
StartKioraCluster starts n KioraInstance's, binding them into a serf cluster.
func (*KioraInstance) GetAlerts ¶
func (k *KioraInstance) GetAlerts(ctx context.Context) []model.Alert
func (*KioraInstance) GetClusterHost ¶
func (k *KioraInstance) GetClusterHost() string
func (*KioraInstance) GetHTTPURL ¶
func (k *KioraInstance) GetHTTPURL(path string) string
GetURL returns a call to this instance, on the given path. This ellides the need to interact with the ports on this instance directly.
func (*KioraInstance) GetSilences ¶
func (*KioraInstance) SendAlert ¶
func (k *KioraInstance) SendAlert(ctx context.Context, alert model.Alert)
func (*KioraInstance) SendAlertAcknowledgement ¶
func (k *KioraInstance) SendAlertAcknowledgement(ctx context.Context, ack ackRequest)
func (*KioraInstance) SendSilence ¶
func (*KioraInstance) Start ¶
func (k *KioraInstance) Start() *KioraInstance
Start actually executes the Kiora command, running it in a background go routine.
func (*KioraInstance) Stderr ¶
func (k *KioraInstance) Stderr() string
Stderr returns the contents of the stderr stream of this instance.
func (*KioraInstance) Stdout ¶
func (k *KioraInstance) Stdout() string
Stdout returns the contents of the stdout stream of this instance.
func (*KioraInstance) Stop ¶
func (k *KioraInstance) Stop() error
Stop sends a sigkill to the process group that backs this instance.
func (*KioraInstance) WaitForExit ¶
func (k *KioraInstance) WaitForExit(ctx context.Context) error
WaitForExit waits for the instance to finish, returning an error if the context expires.
func (*KioraInstance) WaitTillUp ¶
func (k *KioraInstance) WaitTillUp(ctx context.Context) error
func (*KioraInstance) WithConfig ¶
func (k *KioraInstance) WithConfig(config string) *KioraInstance
func (*KioraInstance) WithConfigFile ¶
func (k *KioraInstance) WithConfigFile(configFile string) *KioraInstance
func (*KioraInstance) WithName ¶
func (k *KioraInstance) WithName(name string) *KioraInstance