tail

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config for tails

func Start

func Start(db *sql.DB, table string, target chan string, opts ...Option) (*Config, error)

Start creates and starts a new tail new Tail

func (*Config) Stop

func (c *Config) Stop()

Stop the tail and close the channel

type Option

type Option func(c *Config) (*Config, error)

Option to configure Tails

func Fields

func Fields(fields string) Option

Fields for tail - default is ID

func Format

func Format(format string) Option

Format for tail - default is {{.ID}}

func ID

func ID(id string) Option

ID for tail - default is ID

func Interval

func Interval(d time.Duration) Option

Interval for tail - default is 200ms

func Placeholder

func Placeholder(p string) Option

Placeholder ident to use for your driver, default is :

Jump to

Keyboard shortcuts

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