Documentation ¶
Index ¶
- Constants
- func ListenAndServe(port string, timeout time.Duration, logger *zap.SugaredLogger, ...)
- type BashTask
- type CmdTask
- type GateStorage
- type HelmTask
- type NGrinderTask
- func (task *NGrinderTask) CloneAndStartEndpoint() *url.URL
- func (task *NGrinderTask) Hash() string
- func (task *NGrinderTask) PollStatus(ctx context.Context) bool
- func (task *NGrinderTask) Run(ctx context.Context) bool
- func (task *NGrinderTask) StatusEndpoint() *url.URL
- func (task *NGrinderTask) StopEndpoint() *url.URL
- func (task *NGrinderTask) String() string
- type Task
- type TaskBase
- type TaskFactory
- type TaskRunner
Constants ¶
View Source
const TaskTypeBash = "bash"
View Source
const TaskTypeHelm = "helm"
View Source
const TaskTypeNGrinder = "ngrinder"
View Source
const TaskTypeShell = "cmd"
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
func ListenAndServe(port string, timeout time.Duration, logger *zap.SugaredLogger, taskRunner *TaskRunner, gate *GateStorage, stopCh <-chan struct{})
ListenAndServe starts a web server and waits for SIGTERM
Types ¶
type GateStorage ¶
type GateStorage struct {
// contains filtered or unexported fields
}
func NewGateStorage ¶
func NewGateStorage(backend string) *GateStorage
type NGrinderTask ¶
type NGrinderTask struct { TaskBase // contains filtered or unexported fields }
func (*NGrinderTask) CloneAndStartEndpoint ¶
func (task *NGrinderTask) CloneAndStartEndpoint() *url.URL
nGrinder REST endpoints
func (*NGrinderTask) Hash ¶
func (task *NGrinderTask) Hash() string
func (*NGrinderTask) PollStatus ¶
func (task *NGrinderTask) PollStatus(ctx context.Context) bool
polling execution status of the new test and check if finished
func (*NGrinderTask) Run ¶
func (task *NGrinderTask) Run(ctx context.Context) bool
initiate a clone_and_start request and get new test id from response
func (*NGrinderTask) StatusEndpoint ¶
func (task *NGrinderTask) StatusEndpoint() *url.URL
func (*NGrinderTask) StopEndpoint ¶
func (task *NGrinderTask) StopEndpoint() *url.URL
func (*NGrinderTask) String ¶
func (task *NGrinderTask) String() string
type TaskFactory ¶
type TaskFactory = func(metadata map[string]string, canary string, logger *zap.SugaredLogger) (Task, error)
func GetTaskFactory ¶
func GetTaskFactory(typ string) (TaskFactory, bool)
type TaskRunner ¶
type TaskRunner struct {
// contains filtered or unexported fields
}
func NewTaskRunner ¶
func NewTaskRunner(logger *zap.SugaredLogger, timeout time.Duration) *TaskRunner
func (*TaskRunner) Add ¶
func (tr *TaskRunner) Add(task Task)
func (*TaskRunner) GetTotalExecs ¶
func (tr *TaskRunner) GetTotalExecs() uint64
func (*TaskRunner) Start ¶
func (tr *TaskRunner) Start(interval time.Duration, stopCh <-chan struct{})
Click to show internal directories.
Click to hide internal directories.