daemon

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package daemon implements the Encore daemon gRPC server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	daemonpb.UnimplementedDaemonServer
	// contains filtered or unexported fields
}

Server implements daemonpb.DaemonServer.

func New

func New(version string, mgr *run.Manager, cm *sqldb.ClusterManager, sm *secret.Manager, rc remote.RemoteClient) *Server

New creates a new Server.

func (*Server) Check

Check checks the app for compilation errors.

func (*Server) DBConnect

DBConnect starts the database and returns the DSN for connecting to it.

func (*Server) DBProxy

func (s *Server) DBProxy(params *daemonpb.DBProxyRequest, stream daemonpb.Daemon_DBProxyServer) (err error)

DBProxy starts a local database proxy for connecting to remote databases on the encore.dev platform.

func (*Server) DBReset

DBReset resets the given databases, recreating them from scratch.

func (*Server) GenClient

GenClient generates a client based on the app's API.

func (*Server) Logs

func (s *Server) Logs(params *daemonpb.LogsRequest, stream daemonpb.Daemon_LogsServer) error

Logs streams logs from the encore.dev platform.

func (*Server) OnReload

func (s *Server) OnReload(r *run.Run)

OnReload implements run.EventListener.

func (*Server) OnStart

func (s *Server) OnStart(r *run.Run)

OnStart implements run.EventListener.

func (*Server) OnStderr

func (s *Server) OnStderr(r *