httpclient

package
v0.0.0-...-98ba599 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package httpclient is a lightweight implementation of a client for the HTTP gateway.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrResponseError = errors.New("response error")
	ErrRequestCreate = errors.New("failed to create request")
	ErrRequestSend   = errors.New("failed to send request")
	ErrSerialize     = errors.New("failed to serialize input")
	ErrDeserialize   = errors.New("failed to deserialize input")
)

Functions

This section is empty.

Types

type AdminAPI

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

func NewAdminAPI

func NewAdminAPI(endpoint string, client http.Client) *AdminAPI

func (*AdminAPI) Status

func (api *AdminAPI) Status(ctx context.Context) (*apiserver.Health, error)

func (*AdminAPI) Version

func (api *AdminAPI) Version(ctx context.Context) (*version.Info, error)

type InvocationAPI

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

func NewInvocationAPI

func NewInvocationAPI(endpoint string, client http.Client) *InvocationAPI

func (*InvocationAPI) Cancel

func (api *InvocationAPI) Cancel(ctx context.Context, id string) error

func (*InvocationAPI) Events

func (api *InvocationAPI) Events(ctx context.Context, id string) (*apiserver.ObjectEvents, error)

func (*InvocationAPI) Get

func (*InvocationAPI) Invoke

func (*InvocationAPI) InvokeSync

func (*InvocationAPI) List

func (*InvocationAPI) Validate

func (api *InvocationAPI) Validate(ctx context.Context, spec *types.WorkflowInvocationSpec) error

type WorkflowAPI

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

func NewWorkflowAPI

func NewWorkflowAPI(endpoint string, client http.Client) *WorkflowAPI

func (*WorkflowAPI) Create

func (api *WorkflowAPI) Create(ctx context.Context, spec *types.WorkflowSpec) (*types.ObjectMetadata, error)

func (*WorkflowAPI) CreateSync

func (api *WorkflowAPI) CreateSync(ctx context.Context, spec *types.WorkflowSpec) (*types.Workflow, error)

func (*WorkflowAPI) Delete

func (api *WorkflowAPI) Delete(ctx context.Context, id string) error

func (*WorkflowAPI) Events

func (api *WorkflowAPI) Events(ctx context.Context, id string) (*apiserver.ObjectEvents, error)

func (*WorkflowAPI) Get

func (api *WorkflowAPI) Get(ctx context.Context, id string) (*types.Workflow, error)

func (*WorkflowAPI) List

Jump to

Keyboard shortcuts

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