Documentation
¶
Index ¶
- Constants
- func CheckAuth(ctx context.Context, projectID string) error
- func MakeGCPReader(project, filter, freshness string, strChan chan string) *gcpStream
- func ParseFrom(str string) string
- func Remove(name string) error
- func Save(name string, s *SavedParams) error
- type Reader
- type SavedParams
- type SavedParamsWrapper
- type Type
Constants ¶
View Source
const ( TypeFile = Type(iota) TypePipe TypeGCP )
Variables ¶
This section is empty.
Functions ¶
func MakeGCPReader ¶
func Save ¶
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 ¶
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 ¶
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 ¶
func Load(name string) (*SavedParams, error)
func (*SavedParams) Print ¶
func (spw *SavedParams) Print()
type SavedParamsWrapper ¶
type SavedParamsWrapper struct {
Name string `yaml:"name"`
Params SavedParams `yaml:"params"`
}
func List ¶
func List() ([]*SavedParamsWrapper, error)
func (*SavedParamsWrapper) Print ¶
func (spw *SavedParamsWrapper) Print()
Click to show internal directories.
Click to hide internal directories.