client

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT, MIT Imports: 13 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 client is the plymouth command line: each subcommand and option becomes requests to the daemon, and the daemon's responses become the exit status and output plymouth's client gives, so scripts that call plymouth keep working.

Index

Constants

View Source
const (
	ExitOK = 0
	// ExitFailed is a refused request, an unanswered prompt or bad usage.
	ExitFailed = 1
	// ExitDisconnected is the daemon hanging up mid-request, as plymouth
	// reports it.
	ExitDisconnected = 2
	// ExitNoDaemon is no daemon listening.
	ExitNoDaemon = 3
)

The exit statuses.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(argv []string, input []byte) (int, error)

RunCommand runs argv with input on its standard input, as --command does.

Types

type Client

type Client struct {
	Socket string
	Stdout io.Writer
	Stderr io.Writer
	// Command runs a --command with the answer on its standard input, or
	// none when input is nil, and returns its exit status.
	Command func(argv []string, input []byte) (int, error)
}

Client runs plymouth commands against the daemon at Socket.

func (*Client) Main

func (c *Client) Main(args []string) int

Main runs the plymouth command line args, without the program name, and returns the exit status.

Jump to

Keyboard shortcuts

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