daemon

package
v0.0.0-...-7db3de3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package daemon handles the GRPC daemon with systemd support.

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 is a grpc daemon with systemd support.

func New

func New(ctx context.Context, s *system.System, args ...Option) (*Daemon, 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 drop any existing connection if force is set to true.

func (*Daemon) Serve

func (d *Daemon) Serve(service streams.CommandService) error

Serve serves on the streams, automatically reconnecting when the connection drops. Call Quit to deallocate the resources used in Serve.

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