clients

package
v0.0.0-...-3b05df2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server interface {
	V1() ServerV1
}

func NewServer

func NewServer(addr string) (Server, error)

type ServerV1

type ServerV1 interface {
	SecretList(ctx context.Context, namespace string, opt v1.ListOption) ([]*v1.Secret, *v1.Pagination, error)
	SecretInfo(ctx context.Context, namespace, name string) (*v1.Secret, error)
	SecretCreate(ctx context.Context, data *v1.Secret) error
	SecretUpdate(ctx context.Context, data *v1.Secret) error
	SecretDelete(ctx context.Context, namespace, name string) error

	WorkflowList(ctx context.Context, namespace string, opt v1.ListOption) ([]*v1.Workflow, *v1.Pagination, error)
	WorkflowInfo(ctx context.Context, namespace, name string) (*v1.Workflow, error)
	WorkflowCreate(ctx context.Context, data *v1.Workflow) error
	WorkflowUpdate(ctx context.Context, data *v1.Workflow) error
	WorkflowDelete(ctx context.Context, namespace, name string) error

	BoxList(ctx context.Context, namespace string, opt v1.ListOption) ([]*v1.Box, *v1.Pagination, error)
	BoxInfo(ctx context.Context, namespace, name string) (*v1.Box, error)
	BoxCreate(ctx context.Context, data *v1.Box) error
	BoxUpdate(ctx context.Context, data *v1.Box) error
	BoxDelete(ctx context.Context, namespace, name string) error

	BuildList(ctx context.Context, namespace, name string, page v1.Pagination) ([]*v1.Build, *v1.Pagination, error)
	BuildInfo(ctx context.Context, namespace, name string, number uint64) (*v1.Build, error)
	BuildCreate(ctx context.Context, namespace, name string, settings map[string]string) (uint64, error)
	BuildCancel(ctx context.Context, namespace, name string, number uint64) error

	LogInfo(ctx context.Context, namespace, name string, number, stage, step uint64) ([]*livelog.Line, error)
	LogWatch(ctx context.Context, namespace, name string, number, stage, step uint64) (<-chan *livelog.Line, <-chan error, error)
}

type Worker

type Worker interface {
	V1() WorkerV1
}

func NewWorker

func NewWorker(addr, name string, worker *v1.Worker) (Worker, error)

type WorkerV1

type WorkerV1 interface {
	Name() string
	Status(ctx context.Context) error
	Request(ctx context.Context) (*v1.Stage, error)
	Accept(ctx context.Context, stageID uint64) error
	Info(ctx context.Context, stageID uint64) (*v1.Data, error)
	StageBegin(ctx context.Context, stage *v1.Stage) error
	StageEnd(ctx context.Context, stage *v1.Stage) error
	StepBegin(ctx context.Context, step *v1.Step) error
	StepEnd(ctx context.Context, step *v1.Step) error
	LogUpload(ctx context.Context, stepID uint64, lines []*livelog.Line, isAll bool) error
	WatchCancel(ctx context.Context, buildID uint64) error
}

func NewClientDirect

func NewClientDirect(dataCh chan *v1.Data) WorkerV1

Jump to

Keyboard shortcuts

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