harness

package
v0.0.0-...-93c8805 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoKey       = errors.New("provided key not exists in result")
	ErrBadJsonPath = errors.New("bad json path formula")
)

Functions

This section is empty.

Types

type Action

type Action interface {
	Call(ctx context.Context) (*ActionResult, error)
}

func NewGRPC

func NewGRPC(in v1alpha1.Action) Action

type ActionResult

type ActionResult struct {
	Code string
	Body []byte
}

func OK

func OK() *ActionResult

func (*ActionResult) GetKeyValue

func (a *ActionResult) GetKeyValue(jsonPath string) (string, error)

GetKeyValue look up key in our json representation every time perform JSON marshaling. This is too slow!!!

type Harness

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

func (*Harness) Factory

func (h *Harness) Factory(root context.Context, c controllers.Kube, key string, obj interface{}) error

func (*Harness) GetProcessor

func (h *Harness) GetProcessor(key string) (interface{}, bool)

func (*Harness) Stop

func (h *Harness) Stop(key string)

type Processor

type Processor interface {
	// Start should be blocking operation
	Start(ctx context.Context)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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