client

package
Version: v0.5.28 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrestoClient

type PrestoClient interface {
	// Submits a query to Presto
	ExecuteCommand(ctx context.Context, commandStr string, executeArgs PrestoExecuteArgs) (PrestoExecuteResponse, error)

	// Cancels a currently running Presto query
	KillCommand(ctx context.Context, commandID string) error

	// Gets the status of a Presto query
	GetCommandStatus(ctx context.Context, commandID string) (PrestoStatus, error)
}

Interface to interact with PrestoClient for Presto tasks

func NewNoopPrestoClient

func NewNoopPrestoClient(cfg *config.Config) PrestoClient

type PrestoExecuteArgs

type PrestoExecuteArgs struct {
	RoutingGroup string `json:"routingGroup,omitempty"`
	Catalog      string `json:"catalog,omitempty"`
	Schema       string `json:"schema,omitempty"`
	Source       string `json:"source,omitempty"`
	User         string `json:"user,omitempty"`
}

Contains information needed to execute a Presto query

type PrestoExecuteResponse

type PrestoExecuteResponse struct {
	ID      string `json:"id,omitempty"`
	NextURI string `json:"nextUri,omitempty"`
}

Representation of a response after submitting a query to Presto

type PrestoStatus

type PrestoStatus int
const (
	PrestoStatusUnknown PrestoStatus = iota
	PrestoStatusWaiting
	PrestoStatusRunning
	PrestoStatusFinished
	PrestoStatusFailed
	PrestoStatusCancelled
)

func PrestoStatusString added in v0.3.18

func PrestoStatusString(s string) (PrestoStatus, error)

PrestoStatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func PrestoStatusValues added in v0.3.18

func PrestoStatusValues() []PrestoStatus

PrestoStatusValues returns all values of the enum

func (PrestoStatus) IsAPrestoStatus added in v0.3.18

func (i PrestoStatus) IsAPrestoStatus() bool

IsAPrestoStatus returns "true" if the value is listed in the enum definition. "false" otherwise

func (PrestoStatus) String added in v0.3.18

func (i PrestoStatus) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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