rpc

package
v0.6.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MPL-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRPCFailed = errors.New("RPC server failed")

Functions

This section is empty.

Types

type Option

type Option func(*RPC)

func WithLogger

func WithLogger(logger *echelon.Logger) Option

type RPC

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

func New

func New(build *build.Build, opts ...Option) *RPC

func (*RPC) CacheInfo added in v0.3.0

func (r *RPC) CacheInfo(ctx context.Context, req *api.CacheInfoRequest) (*api.CacheInfoResponse, error)

func (*RPC) ClientSecret

func (r *RPC) ClientSecret() string

func (*RPC) DownloadCache added in v0.3.0

func (*RPC) Endpoint

func (r *RPC) Endpoint() string

Endpoint returns RPC server address suitable for use in agent's "-api-endpoint" flag.

func (*RPC) Heartbeat

func (r *RPC) Heartbeat(ctx context.Context, req *api.HeartbeatRequest) (*api.HeartbeatResponse, error)

func (*RPC) InitialCommands

func (r *RPC) InitialCommands(
	ctx context.Context,
	req *api.InitialCommandsRequest,
) (*api.CommandsResponse, error)

func (*RPC) ReportAgentError

func (r *RPC) ReportAgentError(ctx context.Context, req *api.ReportAgentProblemRequest) (*empty.Empty, error)

func (*RPC) ReportAgentLogs added in v0.3.0

func (r *RPC) ReportAgentLogs(ctx context.Context, req *api.ReportAgentLogsRequest) (*empty.Empty, error)

func (*RPC) ReportAgentSignal

func (r *RPC) ReportAgentSignal(ctx context.Context, req *api.ReportAgentSignalRequest) (*empty.Empty, error)

func (*RPC) ReportAgentWarning

func (r *RPC) ReportAgentWarning(ctx context.Context, req *api.ReportAgentProblemRequest) (*empty.Empty, error)

func (*RPC) ReportAnnotations added in v0.3.0

func (r *RPC) ReportAnnotations(ctx context.Context, req *api.ReportAnnotationsCommandRequest) (*empty.Empty, error)

func (*RPC) ReportSingleCommand

func (r *RPC) ReportSingleCommand(
	ctx context.Context,
	req *api.ReportSingleCommandRequest,
) (*api.ReportSingleCommandResponse, error)

func (*RPC) SaveLogs added in v0.3.0

func (r *RPC) SaveLogs(stream api.CirrusCIService_SaveLogsServer) error

func (*RPC) ServerSecret

func (r *RPC) ServerSecret() string

func (*RPC) Start

func (r *RPC) Start(ctx context.Context) error

Start creates the listener and starts RPC server in a separate goroutine.

func (*RPC) Stop

func (r *RPC) Stop()

Stop gracefully stops the RPC server.

func (*RPC) StreamLogs

func (r *RPC) StreamLogs(stream api.CirrusCIService_StreamLogsServer) error

func (*RPC) UploadArtifacts added in v0.3.0

func (r *RPC) UploadArtifacts(stream api.CirrusCIService_UploadArtifactsServer) error

func (*RPC) UploadCache added in v0.3.0

func (r *RPC) UploadCache(stream api.CirrusCIService_UploadCacheServer) error

Jump to

Keyboard shortcuts

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