server

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const IsoFormat string = "2006-01-02T15:04:05.000Z"

Variables

This section is empty.

Functions

func ErrorToCode added in v0.16.0

func ErrorToCode(err error) codes.Code

ErrorToCode returns the Code of the error if it is a Status error otherwise use status.FromContextError to determine the Code. Log level for error codes is defined in logging.DefaultServerCodeToLevel

func EscapeDoubleQuotes added in v0.15.0

func EscapeDoubleQuotes(column string) string

func EscapeHyphen added in v0.16.0

func EscapeHyphen(column string) string

func EscapeSingleQuotes added in v0.15.0

func EscapeSingleQuotes(value string) string

func GRPCCodeToLevel added in v0.16.0

func GRPCCodeToLevel(code codes.Code) logging.Level

GRPCCodeToLevel overrides the log level of various gRPC codes. We're currently not doing very granular error handling, so we get quite a lot of codes.Unknown errors, which we do not want to emit as error logs.

Types

type ColumnInfo added in v0.15.0

type ColumnInfo struct {
	Name    string
	Type    string
	Unknown int
}

type Options added in v0.16.0

type Options struct {
	HTTPPort int
	GRPCPort int
}

type Server

type Server struct {
	runtimev1.UnsafeRuntimeServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts *Options, rt *runtime.Runtime, logger *zap.Logger) (*Server, error)

func (*Server) CreateInstance

CreateInstance implements RuntimeService

func (*Server) DeleteFile added in v0.15.0

DeleteFile implements RuntimeService

func (*Server) DeleteFileAndReconcile added in v0.16.0

DeleteFileAndReconcile implements RuntimeService

func (*Server) DeleteInstance

DeleteInstance implements RuntimeService

func (*Server) EstimateRollupInterval added in v0.15.0

Metrics/Timeseries APIs

func (*Server) EstimateSmallestTimeGrain added in v0.15.0

func (*Server) ExportTable added in v0.16.0

func (s *Server) ExportTable(w http.ResponseWriter, req *http.Request, pathParams map[string]string)

ExportTable exports a table or view as a flat file and triggers a HTTP download of it. It's mounted as a REST API only, and is not available over gRPC.

TODO: This is a temporary hack that only supports DuckDB. We should add a generic workflow for data export that also supports possibly very large tables.

func (*Server) GenerateTimeSeries added in v0.15.0

func (*Server) GetCardinalityOfColumn added in v0.15.0

func (*Server) GetCatalogEntry added in v0.16.0

GetCatalogEntry implements RuntimeService

func (*Server) GetDescriptiveStatistics added in v0.15.0

func (*Server) GetFile added in v0.15.0

GetFile implements RuntimeService

func (*Server) GetInstance

GetInstance implements RuntimeService

func (*Server) GetNullCount added in v0.15.0

func (s *Server) GetNullCount(ctx context.Context, nullCountRequest *runtimev1.GetNullCountRequest) (*runtimev1.GetNullCountResponse, error)

func (*Server) GetNumericHistogram added in v0.15.0

func (*Server) GetRugHistogram added in v0.15.0

func (*Server) GetTableCardinality added in v0.16.0

Table level profiling APIs

func (*Server) GetTableRows added in v0.16.0

func (*Server) GetTimeRangeSummary added in v0.15.0

func (*Server) GetTopK added in v0.14.0

func (*Server) HTTPHandler added in v0.15.0

func (s *Server) HTTPHandler(ctx context.Context) (http.Handler, error)

HTTPHandler HTTP handler serving REST gateway

func (*Server) ListCatalogEntries added in v0.16.0

ListCatalogEntries implements RuntimeService

func (*Server) ListConnectors

ListConnectors implements RuntimeService

func (*Server) ListFiles added in v0.15.0

ListFiles implements RuntimeService

func (*Server) ListInstances

ListInstances implements RuntimeService

func (*Server) MetricsViewTimeSeries

MetricsViewTimeSeries implements RuntimeService

func (*Server) MetricsViewToplist

MetricsViewToplist implements RuntimeService

func (*Server) MetricsViewTotals

MetricsViewTotals implements RuntimeService

func (*Server) Ping

Ping implements RuntimeService

func (*Server) ProfileColumns added in v0.15.0

func (*Server) PutFile added in v0.15.0

PutFile implements RuntimeService

func (*Server) PutFileAndReconcile added in v0.16.0

PutFileAndReconcile implements RuntimeService

func (*Server) Query

Query implements RuntimeService

func (*Server) Reconcile added in v0.16.0

Reconcile implements RuntimeService

func (*Server) RefreshAndReconcile added in v0.16.0

RefreshAndReconcile implements RuntimeService

func (*Server) RenameFile added in v0.15.0

RenameFile implements RuntimeService

func (*Server) RenameFileAndReconcile added in v0.16.0

RenameFileAndReconcile implements RuntimeService

func (*Server) ServeGRPC added in v0.15.0

func (s *Server) ServeGRPC(ctx context.Context) error

ServeGRPC Starts the gRPC server

func (*Server) ServeHTTP added in v0.15.0

func (s *Server) ServeHTTP(ctx context.Context) error

Starts the HTTP server

func (*Server) TriggerRefresh

TriggerRefresh implements RuntimeService

func (*Server) TriggerSync added in v0.15.0

TriggerSync implements RuntimeService

func (*Server) UploadMultipartFile added in v0.15.0

func (s *Server) UploadMultipartFile(w http.ResponseWriter, req *http.Request, pathParams map[string]string)

UploadMultipartFile implements the same functionality as PutFile, but for multipart HTTP upload. It's mounted only on as a REST API and enables upload of large files (such as data files).

Jump to

Keyboard shortcuts

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