fake

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package fake implements a fake network printer reading LPR protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

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

Printer is a fake printer implementation, which reads LPR requests, and returns them via ReadRequest.

func NewPrinter

func NewPrinter(ctx context.Context) (*Printer, error)

NewPrinter creates and starts a fake printer.

func (*Printer) Close

func (p *Printer) Close()

Close stops the fake printer. This function is safe to call multiple times.

func (*Printer) ReadRequest

func (p *Printer) ReadRequest(ctx context.Context) ([]byte, error)

ReadRequest returns the print request.

Jump to

Keyboard shortcuts

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