Documentation ¶
Index ¶
- type GRPCServer
- type Server
- func (s *Server) Close() error
- func (s *Server) GetChangedOutputs(ctx context.Context, req *turbodprotocol.GetChangedOutputsRequest) (*turbodprotocol.GetChangedOutputsResponse, error)
- func (s *Server) Hello(ctx context.Context, req *turbodprotocol.HelloRequest) (*turbodprotocol.HelloResponse, error)
- func (s *Server) NotifyOutputsWritten(ctx context.Context, req *turbodprotocol.NotifyOutputsWrittenRequest) (*turbodprotocol.NotifyOutputsWrittenResponse, error)
- func (s *Server) OnFileWatchClosed()
- func (s *Server) OnFileWatchError(err error)
- func (s *Server) OnFileWatchEvent(ev filewatcher.Event)
- func (s *Server) Register(grpcServer GRPCServer)
- func (s *Server) Shutdown(ctx context.Context, req *turbodprotocol.ShutdownRequest) (*turbodprotocol.ShutdownResponse, error)
- func (s *Server) Status(ctx context.Context, req *turbodprotocol.StatusRequest) (*turbodprotocol.StatusResponse, error)
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) GetChangedOutputs ¶
func (s *Server) GetChangedOutputs(ctx context.Context, req *turbodprotocol.GetChangedOutputsRequest) (*turbodprotocol.GetChangedOutputsResponse, error)
GetChangedOutputs implements the GetChangedOutputs rpc from turbo.proto
func (*Server) Hello ¶
func (s *Server) Hello(ctx context.Context, req *turbodprotocol.HelloRequest) (*turbodprotocol.HelloResponse, error)
Hello implements the Hello rpc from turbo.proto
func (*Server) NotifyOutputsWritten ¶
func (s *Server) NotifyOutputsWritten(ctx context.Context, req *turbodprotocol.NotifyOutputsWrittenRequest) (*turbodprotocol.NotifyOutputsWrittenResponse, error)
NotifyOutputsWritten implements the NotifyOutputsWritten rpc from turbo.proto
func (*Server) OnFileWatchClosed ¶
func (s *Server) OnFileWatchClosed()
OnFileWatchClosed implements filewatcher.FileWatchClient.OnFileWatchClosed
func (*Server) OnFileWatchError ¶
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 ¶
func (s *Server) Shutdown(ctx context.Context, req *turbodprotocol.ShutdownRequest) (*turbodprotocol.ShutdownResponse, error)
Shutdown implements the Shutdown rpc from turbo.proto
func (*Server) Status ¶
func (s *Server) Status(ctx context.Context, req *turbodprotocol.StatusRequest) (*turbodprotocol.StatusResponse, error)
Status implements the Status rpc from turbo.proto