Documentation
¶
Index ¶
- type Drillbit
- func (d *Drillbit) CreateStorage(name string, storage Storage) (*ResultState, error)
- func (d *Drillbit) DeleteProfile(queryId string) (interface{}, error)
- func (d *Drillbit) DeleteStorage(name string) (*ResultState, error)
- func (d *Drillbit) DisableStorage(name string) (*ResultState, error)
- func (d *Drillbit) EnableStorage(name string) (*ResultState, error)
- func (d *Drillbit) GetProfile(queryId string) (interface{}, error)
- func (d *Drillbit) GetStorage(name string) (*Storage, error)
- func (d *Drillbit) Profiles() (*Profiles, error)
- func (d *Drillbit) Query(v interface{}, sql string) error
- func (d *Drillbit) RawQuery(sql string) (*QueryResponse, error)
- func (d *Drillbit) Storage() (*[]Storage, error)
- type Profile
- type Profiles
- type QueryResponse
- type ResultState
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drillbit ¶
type Drillbit struct {
// contains filtered or unexported fields
}
func NewDrillFromZK ¶
NewDrillFromZK connects to Zookeeper and queries the drillbits
func NewDrillbit ¶
NewDrill connects to a given Drillbit by its REST API
func (*Drillbit) CreateStorage ¶
func (d *Drillbit) CreateStorage(name string, storage Storage) (*ResultState, error)
CreateStorage given a storage name and Storage instance, returns the result as ResultState format
func (*Drillbit) DeleteProfile ¶
DeleteProfile given a query id, returns success if the query is running, otherwise it returns an error as a string so it cannot be decoded
func (*Drillbit) DeleteStorage ¶
func (d *Drillbit) DeleteStorage(name string) (*ResultState, error)
DeleteStorage given a storage name, returns the result as ResultState format
func (*Drillbit) DisableStorage ¶
func (d *Drillbit) DisableStorage(name string) (*ResultState, error)
DisableStorage given a storage name, returns the result as ResultState format
func (*Drillbit) EnableStorage ¶
func (d *Drillbit) EnableStorage(name string) (*ResultState, error)
EnableStorage given a storage name, returns the result as ResultState format
func (*Drillbit) GetProfile ¶
GetProfile given a query id, returns query profile
func (*Drillbit) GetStorage ¶
GetStorage given a storage name, returns the storage as Storage format
func (*Drillbit) Profiles ¶
Profiles returns all running and finished queries as Profile format array
func (*Drillbit) Query ¶
Query is an extension to RawQuery method, which assumes the response is given object, so that we can assume that we can convert to given interface easily so that the caller can use it in a type-safe like manner.
type QueryResponse ¶
type QueryResponse struct {
Columns []string
Rows []interface{}
}
QueryResponse is a https://drill.apache.org/docs/rest-api/#query
type ResultState ¶
type ResultState struct {
Result string `json:"result"`
}