workerclient

package
v0.8.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package workerclient provides a way to communicate with a Wharf worker server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactEvent

type ArtifactEvent = v1.StreamArtifactEventsResponse

ArtifactEvent is an alias for workerapi/v1.StreamArtifactEventsResponse.

type ArtifactEventsRequest

type ArtifactEventsRequest = v1.StreamArtifactEventsRequest

ArtifactEventsRequest is an alias for workerapi/v1.StreamArtifactEventsResponse.

type Client

type Client interface {
	StreamLogs(ctx context.Context, req *LogsRequest, opts ...grpc.CallOption) (v1.Worker_StreamLogsClient, error)
	StreamStatusEvents(ctx context.Context, req *StatusEventsRequest, opts ...grpc.CallOption) (v1.Worker_StreamStatusEventsClient, error)
	StreamArtifactEvents(ctx context.Context, req *ArtifactEventsRequest, opts ...grpc.CallOption) (v1.Worker_StreamArtifactEventsClient, error)
	DownloadArtifact(ctx context.Context, artifactID uint) (io.ReadCloser, error)
	Ping(ctx context.Context) error
	BuildID() uint

	Close() error
}

Client is an interface with methods to communicate with a Wharf worker server.

func New

func New(baseURL string, opts Options) (Client, error)

New creates a new client that can communicate with a Wharf worker server.

Implements the Closer interface.

type LogLine

type LogLine = v1.StreamLogsResponse

LogLine is an alias for workerapi/v1.StreamLogsResponse.

type LogsRequest

type LogsRequest = v1.StreamLogsRequest

LogsRequest is an alias for workerapi/v1.StreamLogsRequest.

type Options

type Options struct {
	// InsecureSkipVerify disables cert verification if set to true.
	//
	// Should NOT be true in a production environment.
	InsecureSkipVerify bool

	// BuildID is the ID of the build from wharf-api.
	BuildID uint
}

Options contains options that can be used in the creation of a new client.

type StatusEvent

type StatusEvent = v1.StreamStatusEventsResponse

StatusEvent is an alias for workerapi/v1.StreamStatusEventsResponse.

type StatusEventsRequest

type StatusEventsRequest = v1.StreamStatusEventsRequest

StatusEventsRequest is an alias for workerapi/v1.StreamStatusEventsRequest.

Jump to

Keyboard shortcuts

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