api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Overview

Package api provide the RESTful APIs to interact with AresDB.

Schemes: http
BasePath: /
Version: 0.0.1

Consumes:
- application/json

Produces:
- application/json

swagger:meta

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMsgFailedToUnmarshalRequest represents error message for unmarshal error.
	ErrMsgFailedToUnmarshalRequest = "Bad request: failed to unmarshal request body"
	// ErrMsgMissingParameter represents error message for missing params error.
	ErrMsgMissingParameter = "Bad request: missing/invalid parameter"
	// ErrMsgFailedToReadRequestBody represents error message for unable to read request body error.
	ErrMsgFailedToReadRequestBody = "Bad request: failed to read request body"
	// ErrMsgNonExistentTable represents error message for table does not exist
	ErrMsgNonExistentTable = "Bad request: table does not exist"
	// ErrMsgNonExistentColumn represents error message for column does not exist
	ErrMsgNonExistentColumn = "Bad request: column does not exist"
	// ErrMsgDeletedColumn represents error message for column is already deleted
	ErrMsgDeletedColumn = "Bad request: column is already deleted"
	// ErrMsgNotImplemented represents error message for method not implemented.
	ErrMsgNotImplemented = "Not implemented"
	// ErrMsgFailedToJSONMarshalResponseBody respresents error message for failure to marshal
	// response body into json.
	ErrMsgFailedToJSONMarshalResponseBody = "Failed to marshal the response body into json"
	// ErrMissingParameter represents api error for missing parameter
	ErrMissingParameter = utils.APIError{
		Code:    http.StatusBadRequest,
		Message: ErrMsgMissingParameter,
	}
	// ErrNotImplemented represents api error for method not implemented.
	ErrNotImplemented = utils.APIError{
		Code:    http.StatusNotImplemented,
		Message: ErrMsgNotImplemented,
	}
	// ErrTableDoesNotExist represents api error for table does not exist.
	ErrTableDoesNotExist = utils.APIError{
		Code:    http.StatusBadRequest,
		Message: ErrMsgNonExistentTable,
	}
	// ErrColumnDoesNotExist represents api error for column does not exist.
	ErrColumnDoesNotExist = utils.APIError{
		Code:    http.StatusBadRequest,
		Message: ErrMsgNonExistentColumn,
	}
	// ErrColumnDeleted represents api error for column is already deleted.
	ErrColumnDeleted = utils.APIError{
		Code:    http.StatusBadRequest,
		Message: ErrMsgDeletedColumn,
	}
	// ErrBatchDoesNotExist represents api error for batch does not exist.
	ErrBatchDoesNotExist = utils.APIError{
		Code:    http.StatusBadRequest,
		Message: "Bad request: batch does not exist",
	}
	// ErrFailedToJSONMarshalResponseBody represents the api error for failure to marshal
	// response body into json.
	ErrFailedToJSONMarshalResponseBody = utils.APIError{
		Code:    http.StatusInternalServerError,
		Message: ErrMsgFailedToJSONMarshalResponseBody,
	}
)

Functions

This section is empty.

Types

type AddColumnRequest

type AddColumnRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
	// in: body
	Body struct {
		// swagger:allOf
		metaCom.Column
		AddToArchivingSortOrder bool `json:"addToArchivingSortOrder,omitempty"`
	} `body:""`
}

AddColumnRequest represents AddColumn request. swagger:parameters addColumn

type AddEnumCaseRequest

type AddEnumCaseRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
	// in: path
	ColumnName string `path:"column" json:"column"`
	// in: body
	Body struct {
		EnumCases []string `json:"enumCases"`
	} `body:""`
}

AddEnumCaseRequest represents AddEnumCase request. swagger:parameters addEnumCase

type AddEnumCaseResponse

type AddEnumCaseResponse struct {
	//in: body
	Body []int
}

AddEnumCaseResponse represents AddEnumCase response. swagger:response addEnumCaseResponse

type AddTableRequest

type AddTableRequest struct {
	// in: body
	Body metaCom.Table `body:""`
}

AddTableRequest represents AddTable request. swagger:parameters addTable

type ArchiveRequest

type ArchiveRequest struct {
	ShardRequest
	Body struct {
		Cutoff uint32 `json:"cutoff"`
	} `body:""`
}

ArchiveRequest represents request to start an on demand archiving.

type BackfillRequest

type BackfillRequest struct {
	ShardRequest
}

BackfillRequest represents request to start an on demand backfill.

type DataHandler

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

DataHandler handles data ingestion requests from the ingestion pipeline.

func NewDataHandler

func NewDataHandler(memStore memstore.MemStore) *DataHandler

NewDataHandler creates a new DataHandler.

func (*DataHandler) PostData

func (handler *DataHandler) PostData(w http.ResponseWriter, r *http.Request)

PostData swagger:route POST /data/{table}/{shard} postData Post new data batch to a existing table shard Consumes:

  • application/upsert-data

Responses:

default: errorResponse
    200: noContentResponse

func (*DataHandler) Register

func (handler *DataHandler) Register(router *mux.Router, wrappers ...utils.HTTPHandlerWrapper)

Register registers http handlers.

type DebugHandler

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

DebugHandler handles debug operations.

func NewDebugHandler

func NewDebugHandler(
	namespace string,
	memStore memstore.MemStore,
	metaStore metaCom.MetaStore,
	queryHandler *QueryHandler,
	healthCheckHandler *HealthCheckHandler,
	shardOwner topology.ShardOwner,
	enumReader mutatorCom.EnumReader,
) *DebugHandler

NewDebugHandler returns a new DebugHandler.

func (*DebugHandler) Archive

func (handler *DebugHandler) Archive(w http.ResponseWriter, r *http.Request)

Archive starts an archiving process on demand.

func (*DebugHandler) Backfill

func (handler *DebugHandler) Backfill(w http.ResponseWriter, r *http.Request)

Backfill starts an backfill process on demand.

func (*DebugHandler) EvictVectorParty

func (handler *DebugHandler) EvictVectorParty(w http.ResponseWriter, r *http.Request)

EvictVectorParty evict a vector party from memory.

func (*DebugHandler) Health

func (handler *DebugHandler) Health(w http.ResponseWriter, r *http.Request)

Health returns whether the health check is on or off

func (*DebugHandler) HealthSwitch

func (handler *DebugHandler) HealthSwitch(w http.ResponseWriter, r *http.Request)

HealthSwitch will turn on health check based on the request.

func (*DebugHandler) ListRedoLogs

func (handler *DebugHandler) ListRedoLogs(w http.ResponseWriter, r *http.Request)

ListRedoLogs lists all the redo log files for a given shard.

func (*DebugHandler) ListUpsertBatches

func (handler *DebugHandler) ListUpsertBatches(w http.ResponseWriter, r *http.Request)

ListUpsertBatches returns offsets of upsert batches in the redo log file.

func (*DebugHandler) LoadVectorParty

func (handler *DebugHandler) LoadVectorParty(w http.ResponseWriter, r *http.Request)

LoadVectorParty requests a vector party from disk if it is not already in memory

func (*DebugHandler) LookupPrimaryKey

func (handler *DebugHandler) LookupPrimaryKey(w http.ResponseWriter, r *http.Request)

LookupPrimaryKey looks up a key in primary key for given table and shard

func (*DebugHandler) Purge

func (handler *DebugHandler) Purge(w http.ResponseWriter, r *http.Request)

Purge starts an purge process on demand.

func (*DebugHandler) ReadBackfillQueueUpsertBatch

func (handler *DebugHandler) ReadBackfillQueueUpsertBatch(w http.ResponseWriter, r *http.Request)

ReadBackfillQueueUpsertBatch reads upsert batch inside backfill manager backfill queue

func (*DebugHandler) ReadUpsertBatch

func (handler *DebugHandler) ReadUpsertBatch(w http.ResponseWriter, r *http.Request)

ReadUpsertBatch shows the records of an upsert batch given a redolog file creation time and upsert batch index within the file.

func (*DebugHandler) Register

func (handler *DebugHandler) Register(router *mux.Router)

Register registers http handlers.

func (*DebugHandler) ShowBatch

func (handler *DebugHandler) ShowBatch(w http.ResponseWriter, r *http.Request)

ShowBatch will only show batches that is present in memory, it will not request batch from DiskStore.

func (*DebugHandler) ShowDeviceStatus

func (handler *DebugHandler) ShowDeviceStatus(w http.ResponseWriter, r *http.Request)

ShowDeviceStatus shows the current scheduler status.

func (*DebugHandler) ShowHostMemory

func (handler *DebugHandler) ShowHostMemory(w http.ResponseWriter, r *http.Request)

ShowHostMemory shows the current host memory usage

func (*DebugHandler) ShowJobStatus

func (handler *DebugHandler) ShowJobStatus(w http.ResponseWriter, r *http.Request)

ShowJobStatus shows the current archive job status.

func (*DebugHandler) ShowShardMeta

func (handler *DebugHandler) ShowShardMeta(w http.ResponseWriter, r *http.Request)

ShowShardMeta shows the metadata for a table shard. It won't show the underlying data.

func (*DebugHandler) ShowShardSet added in v0.0.2

func (handler *DebugHandler) ShowShardSet(w http.ResponseWriter, r *http.Request)

ShowShardSet shows the shard set owned by the server

func (*DebugHandler) Snapshot

func (handler *DebugHandler) Snapshot(w http.ResponseWriter, r *http.Request)

Snapshot starts an snapshot process on demand.

type DeleteColumnRequest

type DeleteColumnRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
	// in: path
	ColumnName string `path:"column" json:"column"`
}

DeleteColumnRequest represents DeleteColumn request. swagger:parameters deleteColumn

type DeleteTableRequest

type DeleteTableRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
}

DeleteTableRequest represents DeleteTable request. swagger:parameters deleteTable

type EnumHandler

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

EnumHandler handlers enum rw

func NewEnumHandler

func NewEnumHandler(memStore memstore.MemStore, metastore metaCom.MetaStore) *EnumHandler

NewEnumHandler returns a new enum handler

func (*EnumHandler) AddEnumCase

func (handler *EnumHandler) AddEnumCase(w http.ResponseWriter, r *http.Request)

AddEnumCase swagger:route POST /schema/tables/{table}/columns/{column}/enum-cases addEnumCase add an enum case to given column of given table return the id of the enum

Responses:

default: errorResponse
    200: addEnumCaseResponse

func (*EnumHandler) ListEnumCases

func (handler *EnumHandler) ListEnumCases(w http.ResponseWriter, r *http.Request)

ListEnumCases swagger:route GET /schema/tables/{table}/columns/{column}/enum-cases listEnumCases list existing enumCases for given table and column

Responses:

default: errorResponse
    200: listEnumCasesResponse

func (*EnumHandler) Register

func (handler *EnumHandler) Register(router *mux.Router, wrappers ...utils.HTTPHandlerWrapper)

Register regists paths

type EvictVectorPartyRequest

type EvictVectorPartyRequest struct {
	LoadVectorPartyRequest
}

EvictVectorPartyRequest represents a evict request for vector party

type GetTableRequest

type GetTableRequest struct {
	//in: path
	TableName string `path:"table" json:"table"`
}

GetTableRequest represents GetTable request. swagger:parameters getTable

type GetTableResponse

type GetTableResponse struct {
	//in: body
	Body       metaCom.Table
	JSONBuffer []byte `json:"-"`
}

GetTableResponse represents GetTable response. swagger:response getTableResponse

type HLLQueryResponseWriter

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

HLLQueryResponseWriter writes query result as application/hll. For more inforamtion, please refer to https://github.com/uber/aresdb/wiki/HyperLogLog.

func (*HLLQueryResponseWriter) GetStatusCode

func (w *HLLQueryResponseWriter) GetStatusCode() int

GetStatusCode returns the status code written into response.

func (*HLLQueryResponseWriter) ReportError

func (w *HLLQueryResponseWriter) ReportError(queryIndex int, table string, err error, statusCode int)

ReportError writes the error of the query to the response.

func (*HLLQueryResponseWriter) ReportQueryContext

func (w *HLLQueryResponseWriter) ReportQueryContext(qc *query.AQLQueryContext)

ReportQueryContext writes the query context to the response. Since the format of application/hll is not designed for human reading, we will ignore storing query context in response for now.

func (*HLLQueryResponseWriter) ReportResult

func (w *HLLQueryResponseWriter) ReportResult(queryIndex int, qc *query.AQLQueryContext)

ReportResult writes the query result to the response.

func (*HLLQueryResponseWriter) Respond

Respond writes the final response into ResponseWriter.

type HealthCheckHandler

type HealthCheckHandler struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

HealthCheckHandler http handler for health check.

func NewHealthCheckHandler

func NewHealthCheckHandler() *HealthCheckHandler

NewHealthCheckHandler return a new http handler for health check.

func (*HealthCheckHandler) HealthCheck

func (handler *HealthCheckHandler) HealthCheck(w http.ResponseWriter, r *http.Request)

HealthCheck is the HealthCheck endpoint.

func (*HealthCheckHandler) Version

func (handler *HealthCheckHandler) Version(w http.ResponseWriter, r *http.Request)

Version is the Version check endpoint.

type HealthSwitchRequest

type HealthSwitchRequest struct {
	OnOrOff string `path:"onOrOff" json:"onOrOff"`
}

HealthSwitchRequest represents the request to turn on/off the health check.

type JSONQueryResponseWriter

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

JSONQueryResponseWriter writes query result as json.

func (*JSONQueryResponseWriter) GetStatusCode

func (w *JSONQueryResponseWriter) GetStatusCode() int

GetStatusCode returns the status code written into response.

func (*JSONQueryResponseWriter) ReportError

func (w *JSONQueryResponseWriter) ReportError(queryIndex int, table string, err error, statusCode int)

ReportError writes the error of the query to the response.

func (*JSONQueryResponseWriter) ReportQueryContext

func (w *JSONQueryResponseWriter) ReportQueryContext(qc *query.AQLQueryContext)

ReportQueryContext writes the query context to the response.

func (*JSONQueryResponseWriter) ReportResult

func (w *JSONQueryResponseWriter) ReportResult(queryIndex int, qc *query.AQLQueryContext)

ReportResult writes the query result to the response.

func (*JSONQueryResponseWriter) Respond

Respond writes the final response into ResponseWriter.

type ListEnumCasesRequest

type ListEnumCasesRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
	// in: path
	ColumnName string `path:"column" json:"column"`
}

ListEnumCasesRequest represents ListEnumCases request. swagger:parameters listEnumCases

type ListEnumCasesResponse

type ListEnumCasesResponse struct {
	//in: body
	EnumCases  []string
	JSONBuffer []byte `json:"-"`
}

ListEnumCasesResponse represents ListEnumCases response. swagger:response listEnumCasesResponse

type ListRedoLogsRequest

type ListRedoLogsRequest struct {
	ShardRequest
}

ListRedoLogsRequest represents the request to list all redo log files for a given shard.

type ListRedoLogsResponse

type ListRedoLogsResponse []string

ListRedoLogsResponse represents the ListRedoLogs response.

type ListUpsertBatchesRequest

type ListUpsertBatchesRequest struct {
	ShardRequest
	// CreationTime of the redolog file.
	CreationTime int64 `path:"creationTime"`
}

ListUpsertBatchesRequest represents the request to list offsets of upsert batches in a redo log file.

type ListUpsertBatchesResponse

type ListUpsertBatchesResponse []int64

ListUpsertBatchesResponse represents the ListUpsertBatches response.

type LoadVectorPartyRequest

type LoadVectorPartyRequest struct {
	ShardRequest
	BatchID    int    `path:"batch" json:"batch"`
	ColumnName string `path:"column" json:"column"`
}

LoadVectorPartyRequest represents a load request for vector party

type LookupPrimaryKeyRequest

type LookupPrimaryKeyRequest struct {
	ShardRequest
	// comma delimited string
	Key string `query:"key" json:"key"`
}

LookupPrimaryKeyRequest represents primary key lookup request

type PanicHandler

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

PanicHandler is a wrapper handler for handling panic in http request handling

func WithPanicHandling

func WithPanicHandling(handler http.Handler) PanicHandler

WithPanicHandling will apply panic handler to regular http handler.

func (PanicHandler) ServeHTTP

func (handler PanicHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP serves http request for PanicHandler.

type PostDataRequest

type PostDataRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
	// in: path
	Shard int `path:"shard" json:"shard"`
	// in: body
	Body []byte `body:""`
}

PostDataRequest represents post data request. swagger:parameters postData

type PurgeRequest

type PurgeRequest struct {
	ShardRequest
	Body struct {
		BatchIDStart int  `json:"batchIDStart"`
		BatchIDEnd   int  `json:"batchIDEnd"`
		SafePurge    bool `json:"safePurge"`
	} `body:""`
}

PurgeRequest represents request to purge a batch.

type QueryHandler

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

QueryHandler handles query execution.

func NewQueryHandler

func NewQueryHandler(memStore memstore.MemStore, shardOwner topology.ShardOwner, cfg common.QueryConfig) *QueryHandler

NewQueryHandler creates a new QueryHandler.

func (*QueryHandler) GetDeviceManager

func (handler *QueryHandler) GetDeviceManager() *query.DeviceManager

GetDeviceManager returns the device manager of query handler.

func (*QueryHandler) HandleAQL

func (handler *QueryHandler) HandleAQL(w http.ResponseWriter, r *http.Request)

HandleAQL swagger:route POST /query/aql queryAQL query in AQL

Consumes:

  • application/json
  • application/hll

Produces:

  • application/json

Responses:

default: errorResponse
    200: aqlResponse
    400: aqlResponse

func (*QueryHandler) HandleSQL added in v0.0.2

func (handler *QueryHandler) HandleSQL(w http.ResponseWriter, r *http.Request)

HandleSQL swagger:route POST /query/sql querySQL query in SQL

Consumes:

  • application/json
  • application/hll

Produces:

  • application/json

Responses:

default: errorResponse
    200: aqlResponse
    400: aqlResponse

func (*QueryHandler) Register

func (handler *QueryHandler) Register(router *mux.Router, wrappers ...utils.HTTPHandlerWrapper)

Register registers http handlers.

type QueryResponseWriter

type QueryResponseWriter interface {
	ReportError(queryIndex int, table string, err error, statusCode int)
	ReportQueryContext(*query.AQLQueryContext)
	ReportResult(int, *query.AQLQueryContext)
	Respond(w http.ResponseWriter)
	GetStatusCode() int
}

QueryResponseWriter defines the interface to write query result and error to final response.

func NewHLLQueryResponseWriter

func NewHLLQueryResponseWriter() QueryResponseWriter

NewHLLQueryResponseWriter creates a new HLLQueryResponseWriter.

func NewJSONQueryResponseWriter

func NewJSONQueryResponseWriter(nQueries int) QueryResponseWriter

NewJSONQueryResponseWriter creates a new JSONQueryResponseWriter.

type ReadBackfillQueueUpsertBatchRequest

type ReadBackfillQueueUpsertBatchRequest struct {
	ShardRequest
	ReadUpsertBatchRequest
}

ReadBackfillQueueUpsertBatchRequest represents the request to show one page of current upsert batch of backfill queue

type ReadRedologUpsertBatchRequest

type ReadRedologUpsertBatchRequest struct {
	ListUpsertBatchesRequest
	ReadUpsertBatchRequest
}

ReadRedologUpsertBatchRequest represents the request to show one page of current upsert batch of a given redolog file.

type ReadUpsertBatchRequest

type ReadUpsertBatchRequest struct {
	// Offset of upsert batch.
	Offset int64 `path:"offset"`
	// Start of records in upsert batch in this page.
	Start int `query:"start,optional"`
	// Number of records to show in this page. If length is 0, it means caller only want to
	// get another metadata of this upsert batch.
	Length int `query:"length,optional"`
	// Draw is the  counter that this object is a response to.
	Draw int `query:"draw,optional"`
}

ReadUpsertBatchRequest represents the request to show one page of current upsert batch

type ReadUpsertBatchResponse

type ReadUpsertBatchResponse struct {
	Data            [][]interface{} `json:"data"`
	ColumnNames     []string        `json:"columnNames"`
	RecordsFiltered int             `json:"recordsFiltered"`
	RecordsTotal    int             `json:"recordsTotal"`
	Draw            int             `json:"draw"`
	Error           string          `json:"error"`
}

ReadUpsertBatchResponse represents ReadUpsertBatch response.

type SchemaHandler

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

SchemaHandler handles schema http requests.

func NewSchemaHandler

func NewSchemaHandler(metaStore metaCom.MetaStore) *SchemaHandler

NewSchemaHandler will create a new SchemaHandler with memStore and metaStore.

func (*SchemaHandler) AddColumn

func (handler *SchemaHandler) AddColumn(w http.ResponseWriter, r *http.Request)

AddColumn swagger:route POST /schema/tables/{table}/columns addColumn add a single column to existing table

Consumes:

  • application/json

Responses:

default: errorResponse
    200: noContentResponse

func (*SchemaHandler) AddTable

func (handler *SchemaHandler) AddTable(w http.ResponseWriter, r *http.Request)

AddTable swagger:route POST /schema/tables addTable add table to table collections

Consumes:

  • application/json

Responses:

default: errorResponse
    200: noContentResponse

func (*SchemaHandler) DeleteColumn

func (handler *SchemaHandler) DeleteColumn(w http.ResponseWriter, r *http.Request)

DeleteColumn swagger:route DELETE /schema/tables/{table}/columns/{column} deleteColumn delete columns from existing table

Responses:

default: errorResponse
    200: noContentResponse

func (*SchemaHandler) DeleteTable

func (handler *SchemaHandler) DeleteTable(w http.ResponseWriter, r *http.Request)

DeleteTable swagger:route DELETE /schema/tables/{table} deleteTable delete table from metaStore

Responses:

default: errorResponse
    200: noContentResponse

func (*SchemaHandler) GetTable

func (handler *SchemaHandler) GetTable(w http.ResponseWriter, r *http.Request)

GetTable swagger:route GET /schema/tables/{table} getTable get the table schema for specific table name

Consumes:

  • application/json

Produces:

  • application/json

Responses:

default: errorResponse
    200: getTableResponse

func (*SchemaHandler) ListTables

func (handler *SchemaHandler) ListTables(w http.ResponseWriter, r *http.Request)

ListTables swagger:route GET /schema/tables listTables List all table schemas Consumes:

  • application/json

Produces:

  • application/json

Responses:

default: errorResponse
    200: stringArrayResponse

func (*SchemaHandler) Register

func (handler *SchemaHandler) Register(router *mux.Router, wrappers ...utils.HTTPHandlerWrapper)

Register registers http handlers.

func (*SchemaHandler) RegisterForDebug

func (handler *SchemaHandler) RegisterForDebug(router *mux.Router, wrappers ...utils.HTTPHandlerWrapper)

RegisterForDebug register handlers for debug port

func (*SchemaHandler) UpdateColumn

func (handler *SchemaHandler) UpdateColumn(w http.ResponseWriter, r *http.Request)

UpdateColumn swagger:route PUT /schema/tables/{table}/columns/{column} updateColumn update specified column

Consumes:

  • application/json

Responses:

default: errorResponse
    200: noContentResponse

func (*SchemaHandler) UpdateTableConfig

func (handler *SchemaHandler) UpdateTableConfig(w http.ResponseWriter, r *http.Request)

UpdateTableConfig swagger:route PUT /schema/tables/{table} updateTableConfig update config of the specified table

Consumes:

  • application/json

Responses:

default: errorResponse
    200: noContentResponse

type ShardRequest

type ShardRequest struct {
	TableName string `path:"table" json:"table"`
	ShardID   int    `path:"shard" json:"shard"`
}

ShardRequest is the common request struct for all shard related operations.

type ShowBatchRequest

type ShowBatchRequest struct {
	ShardRequest
	BatchID  int `path:"batch" json:"batch"`
	StartRow int `query:"startRow,optional" json:"startRow"`
	NumRows  int `query:"numRows,optional" json:"numRows"`
}

ShowBatchRequest represents request to show a batch.

type ShowBatchResponse

type ShowBatchResponse struct {
	Body struct {
		Columns  []string              `json:"columns"`
		Types    []string              `json:"types"`
		Deleted  []int                 `json:"deleted"`
		Vectors  []common.SlicedVector `json:"vectors"`
		StartRow int                   `json:"startRow"`
		NumRows  int                   `json:"numRows"`
	}
}

ShowBatchResponse represents ShowBatch response.

type ShowJobStatusRequest

type ShowJobStatusRequest struct {
	JobType string `path:"jobType" json:"jobType"`
}

ShowJobStatusRequest represents the request to show job statuses for a given job type.

type ShowShardMetaRequest

type ShowShardMetaRequest struct {
	ShardRequest
}

ShowShardMetaRequest represents request to show metadata for a shard.

type SnapshotRequest

type SnapshotRequest struct {
	ShardRequest
}

SnapshotRequest represents request to start an on demand snapshot.

type UpdateColumnRequest

type UpdateColumnRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
	// in: path
	ColumnName string `path:"column" json:"column"`
	// in: body
	Body metaCom.ColumnConfig `body:""`
}

UpdateColumnRequest represents UpdateColumn request. Supported for updates:

preloadingDays
priority

swagger:parameters updateColumn

type UpdateTableConfigRequest

type UpdateTableConfigRequest struct {
	// in: path
	TableName string `path:"table" json:"table"`
	// in: body
	Body metaCom.TableConfig `body:""`
}

UpdateTableConfigRequest represents UpdateTableConfig request. swagger:parameters updateTableConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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