daemon

package
v0.0.0-...-68f985e Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKey

func GetKey() (string, bool)

GetKey attempts to retrieve the master key from the daemon Returns the key and true if the daemon is running, empty string and false otherwise

func IsRunning

func IsRunning() bool

IsRunning checks whether the daemon is running by attempting to connect to the socket

func PidPath

func PidPath() (string, error)

PidPath returns the path to the daemon PID file

func SocketPath

func SocketPath() (string, error)

SocketPath returns the path to the Unix socket

Types

type Request

type Request struct {
	Command string `json:"command"`
}

Request is the message the CLI sends to the daemon

type Response

type Response struct {
	Success bool   `json:"success"`
	Key     string `json:"key,omitempty"`
	Error   string `json:"error,omitempty"`
}

Response is the message the daemon sends back to the CLI

type Server

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

Server is the daemon server

func NewServer

func NewServer(masterKey string) (*Server, error)

NewServer creates a new daemon server with the master key held in memory

func (*Server) Close

func (s *Server) Close()

Close shuts down the server

func (*Server) Serve

func (s *Server) Serve() error

Serve starts the daemon main loop accepting connections

Jump to

Keyboard shortcuts

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