server

package
v0.0.0-...-0a43815 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServer

type GRPCServer interface {
	grpc.ServiceRegistrar
	GracefulStop()
}

GRPCServer is the interface that the turbo server needs to the underlying GRPC server. This lets the turbo server register itself, as well as provides a hook for shutting down the server.

type Server

type Server struct {
	turbodprotocol.UnimplementedTurbodServer
	// contains filtered or unexported fields
}

Server implements the GRPC serverside of TurbodServer Note for the future: we don't yet make use of turbo.json or the package graph in the server. Once we do, we may need a layer of indirection between "the thing that responds to grpc requests" and "the thing that holds our persistent data structures" to handle changes in the underlying configuration.

func New

func New(serverName string, logger hclog.Logger, repoRoot turbopath.AbsoluteSystemPath, turboVersion string, logFilePath turbopath.AbsoluteSystemPath) (*Server, error)

New returns a new instance of Server

func (*Server) Close

func (s *Server) Close() error

Close is used for shutting down this copy of the server

func (*Server) GetChangedOutputs

GetChangedOutputs implements the GetChangedOutputs rpc from turbo.proto

func (*Server) Hello

Hello implements the Hello rpc from turbo.proto

func (*Server) NotifyOutputsWritten

NotifyOutputsWritten implements the NotifyOutputsWritten rpc from turbo.proto

func (*Server) OnFileWatchClosed

func (s *Server) OnFileWatchClosed()

OnFileWatchClosed implements filewatcher.FileWatchClient.OnFileWatchClosed

func (*Server) OnFileWatchError

func (s *Server) OnFileWatchError(err error)

OnFileWatchError implements filewatcher.FileWatchClient.OnFileWatchError

func (*Server) OnFileWatchEvent

func (s *Server) OnFileWatchEvent(ev filewatcher.Event)

OnFileWatchEvent implements filewatcher.FileWatchClient.OnFileWatchEvent In the event that the root of the monorepo is deleted, shut down the server.

func (*Server) Register

func (s *Server) Register(grpcServer GRPCServer)

Register registers this server to respond to GRPC requests

func (*Server) Shutdown

Shutdown implements the Shutdown rpc from turbo.proto

func (*Server) Status

Status implements the Status rpc from turbo.proto

Jump to

Keyboard shortcuts

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