daemon

package
v0.0.0-...-0123ebd Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package daemon implements the Nova gRPC daemon server. All VM lifecycle, network chaos, snapshot, and SSH exec operations are exposed over a Unix domain socket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

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

Daemon manages the gRPC server lifecycle.

func New

func New(stateDir string) (*Daemon, error)

New creates a Daemon that will listen at the given state directory.

func (*Daemon) Run

func (d *Daemon) Run() error

Run starts the gRPC server and blocks until shutdown.

func (*Daemon) SocketPath

func (d *Daemon) SocketPath() string

SocketPath returns the Unix domain socket path.

type Server

type Server struct {
	pb.UnimplementedNovaServer
	// contains filtered or unexported fields
}

Server implements the nova.v1.NovaServer gRPC service.

func NewServer

func NewServer(stateDir string, shutdownFn func()) (*Server, error)

NewServer creates a daemon Server backed by the given state directory.

func (*Server) Apply

func (s *Server) Apply(ctx context.Context, req *pb.ApplyRequest) (*pb.ApplyResponse, error)

func (*Server) Destroy

func (s *Server) Destroy(ctx context.Context, req *pb.DestroyRequest) (*emptypb.Empty, error)

func (*Server) Exec

func (s *Server) Exec(ctx context.Context, req *pb.ExecRequest) (*pb.ExecResponse, error)

func (*Server) Export

func (s *Server) Export(ctx context.Context, req *pb.ExportRequest) (*pb.ExportResponse, error)

func (*Server) LinkDegrade

func (s *Server) LinkDegrade(ctx context.Context, req *pb.LinkDegradeRequest) (*emptypb.Empty, error)

func (*Server) LinkHeal

func (s *Server) LinkHeal(ctx context.Context, req *pb.LinkPairRequest) (*emptypb.Empty, error)

func (*Server) LinkPartition

func (s *Server) LinkPartition(ctx context.Context, req *pb.LinkPairRequest) (*emptypb.Empty, error)

func (*Server) LinkReset

func (s *Server) LinkReset(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

func (*Server) LinkStatus

func (s *Server) LinkStatus(ctx context.Context, _ *emptypb.Empty) (*pb.LinkStatusResponse, error)

func (*Server) NodeKill

func (s *Server) NodeKill(ctx context.Context, req *pb.NodeRequest) (*emptypb.Empty, error)

func (*Server) NodeStart

func (s *Server) NodeStart(ctx context.Context, req *pb.NodeRequest) (*emptypb.Empty, error)

func (*Server) NodeStatus

func (s *Server) NodeStatus(ctx context.Context, req *pb.NodeRequest) (*pb.NodeStatusResponse, error)

func (*Server) NodeStop

func (s *Server) NodeStop(ctx context.Context, req *pb.NodeRequest) (*emptypb.Empty, error)

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

func (*Server) SnapshotDelete

func (s *Server) SnapshotDelete(ctx context.Context, req *pb.SnapshotRequest) (*emptypb.Empty, error)

func (*Server) SnapshotList

func (s *Server) SnapshotList(ctx context.Context, _ *emptypb.Empty) (*pb.SnapshotListResponse, error)

func (*Server) SnapshotRestore

func (s *Server) SnapshotRestore(ctx context.Context, req *pb.SnapshotRequest) (*emptypb.Empty, error)

func (*Server) SnapshotSave

func (s *Server) SnapshotSave(ctx context.Context, req *pb.SnapshotRequest) (*emptypb.Empty, error)

func (*Server) Status

func (s *Server) Status(ctx context.Context, _ *emptypb.Empty) (*pb.StatusResponse, error)

func (*Server) StreamEvents

func (s *Server) StreamEvents(_ *emptypb.Empty, stream pb.Nova_StreamEventsServer) error

func (*Server) StreamLogs

func (s *Server) StreamLogs(req *pb.NodeRequest, stream pb.Nova_StreamLogsServer) error

func (*Server) WaitReady

func (s *Server) WaitReady(ctx context.Context, req *pb.WaitReadyRequest) (*emptypb.Empty, error)

Jump to

Keyboard shortcuts

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