client

package
v0.0.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: BSD-3-Clause Imports: 23 Imported by: 0

README

Client

Client side of Plonk

Documentation

Overview

Package client - Interactive plonk client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Dir      string
	Debug    bool
	Name     string /* Operator name. */
	Colorize bool   /* Output with colors. */

	/* I/O streams, which may be TTYs. */
	Stdin  io.Reader /* Default: os.Stdin. */
	Stdout io.Writer /* Default: os.Stdout. */
	Stderr io.Writer /* Default: os.Stderr. */
	// contains filtered or unexported fields
}

Client implements the server side of Plonk. Before starting, its public fields should be populated.

func (*Client) Debugf

func (c *Client) Debugf(format string, args ...any)

Debugf logs a message to the shell if c.Debug is set.

func (*Client) Start

func (c *Client) Start() error

Start starts the client. Call Wait to wait for it to die, reset the terminal's saved state, and close the connection to the server. There is no Stop method; close the input instead.

func (*Client) Wait

func (c *Client) Wait() error

Wait waits for c to end, closes the connection to the server, and resets the terminal, if applicable. It then returns whatever error caused the client to die.

Jump to

Keyboard shortcuts

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