local

package
v0.50.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFormatConsole = "console"
	LogFormatJSON    = "json"
)

Default log formats for logger

View Source
const (
	DefaultInstanceID   = "default"
	DefaultOLAPDriver   = "duckdb"
	DefaultOLAPDSN      = "main.db"
	DefaultCatalogStore = "meta.db"
	DefaultDBDir        = "tmp"
)

Default instance config on local.

Variables

This section is empty.

Functions

func DefaultProdSlots added in v0.49.1

func DefaultProdSlots(ch *cmdutil.Helper) int

func IsProjectInit added in v0.36.0

func IsProjectInit(projectPath string) bool

IsProjectInit checks if the project is initialized by checking if rill.yaml exists in the project directory. It doesn't use any runtime functions since we need the ability to check this before creating the instance.

Types

type App

type App struct {
	Context     context.Context
	Runtime     *runtime.Runtime
	Instance    *drivers.Instance
	Logger      *zap.SugaredLogger
	BaseLogger  *zap.Logger
	Verbose     bool
	Debug       bool
	ProjectPath string
	// contains filtered or unexported fields
}

App encapsulates the logic associated with configuring and running the UI and the runtime in a local environment. Here, a local environment means a non-authenticated, single-instance and single-project setup on localhost. App encapsulates logic shared between different CLI commands, like start, init, build and source.

func NewApp

func NewApp(ctx context.Context, opts *AppOptions) (*App, error)

func (*App) Close added in v0.18.0

func (a *App) Close() error

func (*App) PollServer added in v0.49.0

func (a *App) PollServer(ctx context.Context, httpPort int, openOnHealthy, secure bool)

func (*App) Serve

func (a *App) Serve(httpPort, grpcPort int, enableUI, openBrowser, readonly bool, userID, tlsCertPath, tlsKeyPath string) error

type AppOptions added in v0.41.0

type AppOptions struct {
	Ch             *cmdutil.Helper
	Verbose        bool
	Debug          bool
	Reset          bool
	Environment    string
	OlapDriver     string
	OlapDSN        string
	ProjectPath    string
	LogFormat      LogFormat
	Variables      map[string]string
	LocalURL       string
	AllowedOrigins []string
}

type LogFormat added in v0.19.0

type LogFormat string

func ParseLogFormat added in v0.19.0

func ParseLogFormat(format string) (LogFormat, bool)

type Server added in v0.45.0

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

Server implements endpoints for the local Rill app (usually served on localhost).

func (*Server) DeployProject added in v0.47.0

DeployProject implements localv1connect.LocalServiceHandler.

func (*Server) GetCurrentProject added in v0.48.0

GetCurrentProject implements localv1connect.LocalServiceHandler.

func (*Server) GetCurrentUser added in v0.47.0

GetCurrentUser implements localv1connect.LocalServiceHandler.

func (*Server) GetMetadata added in v0.45.0

GetMetadata implements localv1connect.LocalServiceHandler.

func (*Server) GetVersion added in v0.45.0

GetVersion implements localv1connect.LocalServiceHandler.

func (*Server) Ping added in v0.45.0

Ping implements localv1connect.LocalServiceHandler.

func (*Server) PushToGithub added in v0.47.0

PushToGithub implements localv1connect.LocalServiceHandler. It assumes that the current project is not a git repo, it should generally be called after DeployValidation.

func (*Server) RedeployProject added in v0.47.0

RedeployProject implements localv1connect.LocalServiceHandler.

func (*Server) RegisterHandlers added in v0.45.0

func (s *Server) RegisterHandlers(mux *http.ServeMux, httpPort int, secure, enableUI bool)

RegisterHandlers registers the server's handlers on the provided ServeMux.

Jump to

Keyboard shortcuts

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