Documentation ¶
Overview ¶
Package client is an abstract API client for a Furan RPC service using API key authentication
Index ¶
- type Options
- type RemoteBuilder
- func (rb *RemoteBuilder) CancelBuild(ctx context.Context, id uuid.UUID) error
- func (rb *RemoteBuilder) Close()
- func (rb *RemoteBuilder) GetBuildStatus(ctx context.Context, id uuid.UUID) (*furanrpc.BuildStatusResponse, error)
- func (rb *RemoteBuilder) ListBuilds(ctx context.Context, req furanrpc.ListBuildsRequest) ([]furanrpc.BuildStatusResponse, error)
- func (rb *RemoteBuilder) MonitorBuild(ctx context.Context, id uuid.UUID) (furanrpc.FuranExecutor_MonitorBuildClient, error)
- func (rb *RemoteBuilder) StartBuild(ctx context.Context, req furanrpc.BuildRequest) (uuid.UUID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { Address string // Furan RPC server address (host:port) APIKey string // RPC API key TLSInsecureSkipVerify bool // Skip verifying TLS certificates (INSECURE) }
Options contains options for the RPC client
type RemoteBuilder ¶
type RemoteBuilder struct {
// contains filtered or unexported fields
}
RemoteBuilder is a Furan RPC client
func New ¶
func New(opts Options) (*RemoteBuilder, error)
New returns a Furan RPC client connected to Options.Address using Options.APIKey for authentication. TLS is enabled by default unless specifically disabled. You must call Close() on the client to close the connection and free resources when finished
func (*RemoteBuilder) CancelBuild ¶
CancelBuild requests cancellation for a currently running build
func (*RemoteBuilder) Close ¶
func (rb *RemoteBuilder) Close()
Close closes any active connections to the RPC server
func (*RemoteBuilder) GetBuildStatus ¶
func (rb *RemoteBuilder) GetBuildStatus(ctx context.Context, id uuid.UUID) (*furanrpc.BuildStatusResponse, error)
GetBuildStatus gets the current build status for the build id
func (*RemoteBuilder) ListBuilds ¶
func (rb *RemoteBuilder) ListBuilds(ctx context.Context, req furanrpc.ListBuildsRequest) ([]furanrpc.BuildStatusResponse, error)
func (*RemoteBuilder) MonitorBuild ¶
func (rb *RemoteBuilder) MonitorBuild(ctx context.Context, id uuid.UUID) (furanrpc.FuranExecutor_MonitorBuildClient, error)
MonitorBuild opens a streaming RPC connection to monitor build events for a currently-running build Call the Recv() method on the returned monitor client to receive build messages Cancel the context when finished to close the connection
func (*RemoteBuilder) StartBuild ¶
func (rb *RemoteBuilder) StartBuild(ctx context.Context, req furanrpc.BuildRequest) (uuid.UUID, error)
StartBuild starts a build and returns the id or error