runtime

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	ID   uuid.UUID
	Conn infra.Connection
}

Instance represents a single Rill project (call it session, release, kernel, environment, ...)

func (*Instance) Load

func (i *Instance) Load() error

Load looks for the instance and connects to its infra

func (*Instance) Query

func (r *Instance) Query(ctx context.Context, stmt *infra.Statement) (*sqlx.Rows, error)

type Runtime

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

Runtime is a data infra proxy and orchestrator. It's a multi-tenant service that can manage many projects. Each project is represented by an Instance. It supports scale-out when no local infra drivers are registered (i.e. not DuckDB).

func New

func New(db metadata.DB, logger zerolog.Logger) *Runtime

New creates a Runtime

func (*Runtime) CreateInstance

func (r *Runtime) CreateInstance(driver string, dsn string) (*Instance, error)

CreateInstance creates a new instance

func (*Runtime) InstanceFromID

func (r *Runtime) InstanceFromID(id uuid.UUID) *Instance

InstanceFromID prepares (but doesn't load) and existing instance. Call Load on the instance to connect.

type Server

type Server struct {
	proto.UnimplementedRuntimeServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts *ServerOptions, runtime *Runtime, logger zerolog.Logger) *Server

func (*Server) CreateInstance

CreateInstance implements RuntimeService

func (*Server) MetricsViewMeta

MetricsViewMeta implements RuntimeService

func (*Server) MetricsViewTimeSeries

MetricsViewTimeSeries implements RuntimeService

func (*Server) MetricsViewToplist

MetricsViewToplist implements RuntimeService

func (*Server) Ping

func (s *Server) Ping(ctx context.Context, req *proto.PingRequest) (*proto.PingResponse, error)

Ping implements RuntimeService

func (*Server) QueryDirect

QueryDirect implements RuntimeService

func (*Server) Serve

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

type ServerOptions

type ServerOptions struct {
	HTTPPort int
	GRPCPort int
}

Directories

Path Synopsis
pkg
Package proto is a reverse proxy.
Package proto is a reverse proxy.

Jump to

Keyboard shortcuts

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