portal

package
v0.0.0-...-ef18ccb Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Height   int                      // Height of the Portal
	Width    int                      // Width of the Portal
	OutFile  string                   // OutFile is the output-file to log the output to
	HeaderFn func(interface{}) string // HeaderFn is the function that returns the evaluated header string
	FooterFn func(interface{}) string // FooterFn is the function that returns the evaluated footer string
}

Options configure the working of Portal.

type Portal

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

Portal keeps the state of the portal from creation to end.

func New

func New(opt *Options) *Portal

New creates a new instance of Portal.

func (*Portal) Close

func (p *Portal) Close()

Close releases the resources being used by the portal and closes it.

func (*Portal) Open

func (p *Portal) Open() chan<- string

Open starts the portal to process the incoming text. It returns a channel to input the text.

Jump to

Keyboard shortcuts

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