daemon

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: GPL-3.0, LGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package daemon handles the GRPC daemon with systemd support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSocketPath

func WithSocketPath(p string) func(o *options)

WithSocketPath uses a manual socket path instead of socket activation.

Types

type Daemon

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

Daemon is a grpc daemon with systemd support.

func New

func New(ctx context.Context, registerGRPCService GRPCServiceRegisterer, args ...Option) (d *Daemon, err error)

New returns an new, initialized daemon server, which handles systemd activation. If systemd activation is used, it will override any socket passed here.

func (Daemon) Quit

func (d Daemon) Quit(ctx context.Context, force bool)

Quit gracefully quits listening loop and stops the grpc server. It can drops any existing connexion is force is true.

func (*Daemon) Serve

func (d *Daemon) Serve(ctx context.Context) (err error)

Serve listens on a tcp socket and starts serving GRPC requests on it.

type GRPCServiceRegisterer

type GRPCServiceRegisterer func(context.Context) *grpc.Server

GRPCServiceRegisterer is a function that the daemon will call everytime we want to build a new GRPC object.

type Option

type Option func(*options)

Option is the function signature used to tweak the daemon creation.

Jump to

Keyboard shortcuts

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