sink

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Prince = "prince"

Prince ...

Variables

View Source
var Registry = map[string]theme{
	Prince: mustLoad(Prince),
}

Registry is the registry of theme names to their structs.

Functions

func Names

func Names() []string

Names all available theme names.

func NewChanWriterAt

func NewChanWriterAt(
	src source.Source,
	out chan source.Event,
) io.WriterAt

NewChanWriterAt ...

func NewOut

func NewOut(name string, writer io.WriteCloser) chan string

NewOut ...

Types

type Config

type Config struct {
	AutoResize       *bool          `yaml:"auto_resize,omitempty"`
	ShowSchema       *bool          `yaml:"show_schema,omitempty"`
	Color            *bool          `yaml:"color,omitempty"`
	Columns          []string       `yaml:"columns,omitempty"`
	ConsistentColors *bool          `yaml:"consistent_colors,omitempty"`
	Expand           *bool          `yaml:"expand,omitempty"`
	Highlight        *bool          `yaml:"highlight,omitempty"`
	MultiLine        *bool          `yaml:"multi_line,omitempty"`
	Theme            *theme         `yaml:"theme,omitempty"`
	Layout           *layout.Layout `yaml:"-"`
	TimeFormat       *string        `yaml:"time_format,omitempty"`
	TTY              bool           `yaml:"-"`
	Width            *uint          `yaml:"width,omitempty"`
	Wrap             *bool          `yaml:"wrap,omitempty"`
	Out              *os.File       `yaml:"-"`
}

Config ...

func (Config) EffectiveIsTTY

func (config Config) EffectiveIsTTY() bool

EffectiveIsTTY ...

func (Config) EffectiveTerminalWidth

func (config Config) EffectiveTerminalWidth() uint

EffectiveTerminalWidth ...

func (*Config) FillMissing

func (config *Config) FillMissing(other Config)

FillMissing ...

type Sink

type Sink interface {
	// Init called prior to the beginning of logging.
	Init(sources []*source.Source)
	// Accept consumes an event, typically for display.
	Accept(event model.SinkEvent) error
}

Sink of events. Responsible for consuming an event.

type Style

type Style struct {
	Fg string `yaml:"fg"`
	Bg string `yaml:"bg"`
}

Style ...

func (Style) Format

func (s Style) Format() func(value string) string

Format ...

func (Style) Reverse

func (s Style) Reverse() Style

Reverse ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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