reader

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeFile = Type(iota)
	TypePipe
	TypeGCP
)

Variables

This section is empty.

Functions

func CheckAuth added in v0.3.2

func CheckAuth(ctx context.Context, projectID string) error

func MakeGCPReader added in v0.2.10

func MakeGCPReader(project, filter, freshness string, strChan chan string) *gcpStream

func ParseFrom added in v0.2.10

func ParseFrom(str string) string

func Remove added in v0.2.10

func Remove(name string) error

func Save added in v0.2.10

func Save(name string, s *SavedParams) error

Types

type Reader

type Reader interface {
	// StreamInto feeds the strChan channel for every streamed line.
	StreamInto() error
	// Close finalises and invalidates this stream reader.
	Close()
	// ChanReader returns the outbound channel reader
	ChanReader() <-chan string
	// ErrorNotifier registers a callback func that's called upon fatal streaming log.
	ErrorNotifier(onError func(err error))
}

func MakeReader

func MakeReader(fileName string, strChan chan string) Reader

MakeReader builds a continues file/pipe streamer used to feed the logger. If fileName is not provided, it will attempt to consume the input from the stdin.

type SavedParams added in v0.2.10

type SavedParams struct {
	From     string `yaml:"from,omitempty"`
	Filter   string `yaml:"filter,omitempty"`
	Project  string `yaml:"project,omitempty"`
	Template string `yaml:"template,omitempty"`
}

func Load added in v0.2.10

func Load(name string) (*SavedParams, error)

func (*SavedParams) Print added in v0.2.10

func (spw *SavedParams) Print()

type SavedParamsWrapper added in v0.2.10

type SavedParamsWrapper struct {
	Name   string      `yaml:"name"`
	Params SavedParams `yaml:"params"`
}

func List added in v0.2.10

func List() ([]*SavedParamsWrapper, error)

func (*SavedParamsWrapper) Print added in v0.2.10

func (spw *SavedParamsWrapper) Print()

type Type added in v0.2.12

type Type = int64

Jump to

Keyboard shortcuts

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