server

package
v0.0.0-...-afecb3f Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MPL-2.0 Imports: 13 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 titan server needs to the underlying GRPC server. This lets the titan server register itself, as well as provides a hook for shutting down the server.

type Server

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

Server implements the GRPC serverside of TurbodServer Note for the future: we don't yet make use of titan.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 titanpath.AbsoluteSystemPath, titanVersion string, logFilePath titanpath.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 titan.proto

func (*Server) Hello

Hello implements the Hello rpc from titan.proto

func (*Server) NotifyOutputsWritten

NotifyOutputsWritten implements the NotifyOutputsWritten rpc from titan.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 titan.proto

func (*Server) Status

Status implements the Status rpc from titan.proto

Jump to

Keyboard shortcuts

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