rpc

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 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 Client

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

Client defines an RPC client.

func NewClient

func NewClient(server, token string) *Client

NewClient returns a new rpc client that is able to interact with a remote build controller using the http transport.

func (*Client) Accept

func (s *Client) Accept(ctx context.Context, stage int64, machine string) (*core.Stage, error)

Accept accepts the build stage for execution.

func (*Client) After

func (s *Client) After(ctx context.Context, step *core.Step) error

After signals the build step is complete.

func (*Client) AfterAll

func (s *Client) AfterAll(ctx context.Context, stage *core.Stage) error

AfterAll signals the build stage is complete.

func (*Client) Before

func (s *Client) Before(ctx context.Context, step *core.Step) error

Before signals the build step is about to start.

func (*Client) BeforeAll

func (s *Client) BeforeAll(ctx context.Context, stage *core.Stage) error

BeforeAll signals the build stage is about to start.

func (*Client) Details

func (s *Client) Details(ctx context.Context, stage int64) (*manager.Context, error)

Details fetches build details

func (*Client) Netrc

func (s *Client) Netrc(ctx context.Context, repo int64) (*core.Netrc, error)

Netrc returns a valid netrc for execution.

func (*Client) Request

func (s *Client) Request(ctx context.Context, args *manager.Request) (*core.Stage, error)

Request requests the next available build stage for execution.

func (*Client) SetDebug

func (s *Client) SetDebug(debug bool)

SetDebug enabled debug-level logging within the retryable http.Client. This can be useful if you are debugging network connectivity issues and want to monitor disconnects, reconnects, and retries.

func (*Client) Upload

func (s *Client) Upload(ctx context.Context, step int64, r io.Reader) error

func (*Client) UploadBytes

func (s *Client) UploadBytes(ctx context.Context, step int64, data []byte) error

func (*Client) Watch

func (s *Client) Watch(ctx context.Context, build int64) (bool, error)

func (*Client) Write

func (s *Client) Write(ctx context.Context, step int64, line *core.Line) error

type Server

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

Server is an rpc handler that enables remote interaction between the server and controller using the http transport.

func NewServer

func NewServer(manager manager.BuildManager, secret string) *Server

NewServer returns a new rpc server that enables remote interaction with the build controller using the http transport.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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