Documentation
¶
Index ¶
- type CancelCommandRequest
- type CancelResponse
- type CancelWaiter
- func (w *CancelWaiter) Done(ctx context.Context, opts ...call.Option) (bool, error)
- func (w *CancelWaiter) GetClusterId() string
- func (w *CancelWaiter) GetCommandId() string
- func (w *CancelWaiter) GetContextId() string
- func (w *CancelWaiter) Wait(ctx context.Context, opts ...lro.Option) (*GetCommandStatusResponse, error)
- type Client
- func (c *Client) Cancel(ctx context.Context, req CancelCommandRequest, opts ...call.Option) (*CancelWaiter, error)
- func (c *Client) Create(ctx context.Context, req CreateContextRequest, opts ...call.Option) (*CreateWaiter, error)
- func (c *Client) Destroy(ctx context.Context, req DestroyContextRequest, opts ...call.Option) (*DestroyResponse, error)
- func (c *Client) Execute(ctx context.Context, req ExecuteCommandRequest, opts ...call.Option) (*ExecuteWaiter, error)
- func (c *Client) GetCommandStatus(ctx context.Context, req GetCommandStatusRequest, opts ...call.Option) (*GetCommandStatusResponse, error)
- func (c *Client) GetContextStatus(ctx context.Context, req GetContextStatusRequest, opts ...call.Option) (*GetContextStatusResponse, error)
- type CommandStatus
- type ContextStatus
- type CreateContextRequest
- type CreateResponse
- type CreateWaiter
- type DestroyContextRequest
- type DestroyResponse
- type ExecuteCommandRequest
- type ExecuteWaiter
- func (w *ExecuteWaiter) Done(ctx context.Context, opts ...call.Option) (bool, error)
- func (w *ExecuteWaiter) GetClusterId() string
- func (w *ExecuteWaiter) GetCommandId() string
- func (w *ExecuteWaiter) GetContextId() string
- func (w *ExecuteWaiter) Wait(ctx context.Context, opts ...lro.Option) (*GetCommandStatusResponse, error)
- type GetCommandStatusRequest
- type GetCommandStatusResponse
- type GetContextStatusRequest
- type GetContextStatusResponse
- type Language
- type ResultType
- type Results
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelCommandRequest ¶
type CancelResponse ¶
type CancelResponse struct {
}
type CancelWaiter ¶
type CancelWaiter struct {
// contains filtered or unexported fields
}
CancelWaiter tracks the state of the operation started by Cancel.
func (*CancelWaiter) Done ¶
Done polls once and reports whether the operation has reached a terminal state.
func (*CancelWaiter) GetClusterId ¶
func (w *CancelWaiter) GetClusterId() string
GetClusterId returns the ClusterId value used to identify the operation.
func (*CancelWaiter) GetCommandId ¶
func (w *CancelWaiter) GetCommandId() string
GetCommandId returns the CommandId value used to identify the operation.
func (*CancelWaiter) GetContextId ¶
func (w *CancelWaiter) GetContextId() string
GetContextId returns the ContextId value used to identify the operation.
func (*CancelWaiter) Wait ¶
func (w *CancelWaiter) Wait(ctx context.Context, opts ...lro.Option) (*GetCommandStatusResponse, error)
Wait polls until the operation reaches a terminal state.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Cancel ¶
func (c *Client) Cancel(ctx context.Context, req CancelCommandRequest, opts ...call.Option) (*CancelWaiter, error)
Cancels a currently running command within an execution context.
The command ID is obtained from a prior successful call to __execute__.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, req CreateContextRequest, opts ...call.Option) (*CreateWaiter, error)
Creates an execution context for running cluster commands.
If successful, this method returns the ID of the new execution context.
func (*Client) Destroy ¶
func (c *Client) Destroy(ctx context.Context, req DestroyContextRequest, opts ...call.Option) (*DestroyResponse, error)
Deletes an execution context.
func (*Client) Execute ¶
func (c *Client) Execute(ctx context.Context, req ExecuteCommandRequest, opts ...call.Option) (*ExecuteWaiter, error)
Runs a cluster command in the given execution context, using the provided language.
If successful, it returns an ID for tracking the status of the command's execution.
func (*Client) GetCommandStatus ¶
func (c *Client) GetCommandStatus(ctx context.Context, req GetCommandStatusRequest, opts ...call.Option) (*GetCommandStatusResponse, error)
Gets the status of and, if available, the results from a currently executing command.
The command ID is obtained from a prior successful call to __execute__.
func (*Client) GetContextStatus ¶
func (c *Client) GetContextStatus(ctx context.Context, req GetContextStatusRequest, opts ...call.Option) (*GetContextStatusResponse, error)
Gets the status for an execution context.
type CommandStatus ¶
type CommandStatus string
const ( CommandStatus_Unspecified CommandStatus = "" CommandStatus_CommandCancelled CommandStatus = "Cancelled" CommandStatus_CommandCancelling CommandStatus = "Cancelling" CommandStatus_CommandError CommandStatus = "Error" CommandStatus_CommandFinished CommandStatus = "Finished" CommandStatus_CommandQueued CommandStatus = "Queued" CommandStatus_CommandRunning CommandStatus = "Running" )
type ContextStatus ¶
type ContextStatus string
const ( ContextStatus_Unspecified ContextStatus = "" ContextStatus_ContextRunning ContextStatus = "Running" ContextStatus_ContextPending ContextStatus = "Pending" ContextStatus_ContextError ContextStatus = "Error" )
type CreateContextRequest ¶
type CreateResponse ¶
type CreateResponse struct {
Id *string
}
type CreateWaiter ¶
type CreateWaiter struct {
// contains filtered or unexported fields
}
CreateWaiter tracks the state of the operation started by Create.
func (*CreateWaiter) Done ¶
Done polls once and reports whether the operation has reached a terminal state.
func (*CreateWaiter) GetClusterId ¶
func (w *CreateWaiter) GetClusterId() string
GetClusterId returns the ClusterId value used to identify the operation.
func (*CreateWaiter) GetContextId ¶
func (w *CreateWaiter) GetContextId() string
GetContextId returns the ContextId value used to identify the operation.
func (*CreateWaiter) Wait ¶
func (w *CreateWaiter) Wait(ctx context.Context, opts ...lro.Option) (*GetContextStatusResponse, error)
Wait polls until the operation reaches a terminal state.
type DestroyContextRequest ¶
type DestroyResponse ¶
type DestroyResponse struct {
}
type ExecuteCommandRequest ¶
type ExecuteWaiter ¶
type ExecuteWaiter struct {
// contains filtered or unexported fields
}
ExecuteWaiter tracks the state of the operation started by Execute.
func (*ExecuteWaiter) Done ¶
Done polls once and reports whether the operation has reached a terminal state.
func (*ExecuteWaiter) GetClusterId ¶
func (w *ExecuteWaiter) GetClusterId() string
GetClusterId returns the ClusterId value used to identify the operation.
func (*ExecuteWaiter) GetCommandId ¶
func (w *ExecuteWaiter) GetCommandId() string
GetCommandId returns the CommandId value used to identify the operation.
func (*ExecuteWaiter) GetContextId ¶
func (w *ExecuteWaiter) GetContextId() string
GetContextId returns the ContextId value used to identify the operation.
func (*ExecuteWaiter) Wait ¶
func (w *ExecuteWaiter) Wait(ctx context.Context, opts ...lro.Option) (*GetCommandStatusResponse, error)
Wait polls until the operation reaches a terminal state.
type GetCommandStatusRequest ¶
Request to get the status of a previously submitted command..
type GetCommandStatusResponse ¶
type GetCommandStatusResponse struct {
Id *string
Status CommandStatus
Results *Results
}
type GetContextStatusRequest ¶
Request to retrieve the status of an execution context..
type GetContextStatusResponse ¶
type GetContextStatusResponse struct {
Id *string
Status ContextStatus
}
type ResultType ¶
type ResultType string
const ( ResultType_Unspecified ResultType = "" ResultType_ErrorResult ResultType = "error" ResultType_ImageResult ResultType = "image" ResultType_ImagesResult ResultType = "images" ResultType_TableResult ResultType = "table" ResultType_TextResult ResultType = "text" )
type Results ¶
type Results struct {
// The cause of the error
Cause *string
Data json.RawMessage
// The image data in one of the following formats:
//
// 1. A Data URL with base64-encoded image data:
// `data:image/{type};base64,{base64-data}`. Example:
// `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...`
//
// 2. A FileStore file path for large images: `/plots/{filename}.png`. Example:
// `/plots/b6a7ad70-fb2c-4353-8aed-3f1e015174a4.png`
FileName *string
// List of image data for multiple images. Each element follows the same format
// as file_name.
FileNames []string
// true if a JSON schema is returned instead of a string representation of the
// Hive type.
IsJsonSchema *bool
// internal field used by SDK
Pos *int
ResultType ResultType
// The table schema
Schema []map[string]json.RawMessage
// The summary of the error
Summary *string
// true if partial results are returned.
Truncated *bool
}