integration

package
v0.0.0-...-8ca999e Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteConfigFile

func WriteConfigFile(t *testing.T, config string) string

WriteConfigFile writes out the given config to a file, returning the path that can be added to a Kiora instance.

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 (k *KioraInstance) GetSilences(ctx context.Context, matchers []string) []model.Silence

func (*KioraInstance) IsUp

func (k *KioraInstance) IsUp(ctx context.Context) bool

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 (k *KioraInstance) SendSilence(ctx context.Context, silence model.Silence) model.Silence

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

Jump to

Keyboard shortcuts

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