kafkabench

package
v0.0.0-...-cfc66e3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

Setup adds a controller that reconciles KafkaBench managed resources.

Types

type AgentStatusResponse

type AgentStatusResponse struct {
	ServerStartMs int64                         `json:"serverStartMs,omitempty"`
	Workers       map[string]AgentStatusWorkers `json:"workers,omitempty"`
}

AgentStatusResponse encapsulates the response from the Trogdor Agent status endpoint

type AgentStatusWorkers

type AgentStatusWorkers struct {
	State     string      `json:"state,omitempty"`
	TaskID    string      `json:"taskId,omitempty"`
	StartedMs int64       `json:"startedMs,omitempty"`
	DoneMs    int64       `json:"doneMs,omitempty"`
	Status    interface{} `json:"status,omitempty"`
	Error     string      `json:"error,omitempty"`
}

AgentStatusWorkers represents the worker status as returned by Trogdor Agent API

type NoOpService

type NoOpService struct{}

A NoOpService does nothing.

type TrogdorAgentService

type TrogdorAgentService struct {
	// contains filtered or unexported fields
}

TrogdorAgentService provides access to the Trogdor Agent REST API

func NewTrogdorService

func NewTrogdorService() *TrogdorAgentService

NewTrogdorService returns a new instance of Trogdor Service

func (*TrogdorAgentService) CollectWorkerTaskResult

func (tas *TrogdorAgentService) CollectWorkerTaskResult(workerID string) (*AgentStatusWorkers, error)

CollectWorkerTaskResult checks the status of a given workerID in Trogdor agents

func (*TrogdorAgentService) CreateWorkerTask

func (tas *TrogdorAgentService) CreateWorkerTask(spec v1alpha1.KafkaBenchSpec) (*WorkerTask, error)

CreateWorkerTask initiates a new worker task on Trogdor agents

func (*TrogdorAgentService) DeleteWorkerTask

func (tas *TrogdorAgentService) DeleteWorkerTask(workerID string) error

DeleteWorkerTask removes a given worker in Trogdor agents

type WorkerTask

type WorkerTask struct {
	TaskID   string         `json:"taskId,omitempty"`
	WorkerID int64          `json:"workerId,omitempty"`
	Spec     WorkerTaskSpec `json:"spec,omitempty"`
}

WorkerTask represents the parameters necessary to create a new worker task in Trogdor Agent

type WorkerTaskSpec

type WorkerTaskSpec struct {
	v1alpha1.KafkaBenchSpec
	StartMs int64 `json:"startMs,omitempty"`
}

WorkerTaskSpec is part of the WorkerTask and contains the specification for the worker

Jump to

Keyboard shortcuts

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