backends

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: BSD-3-Clause Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileBackend

type FileBackend struct {
	*WriteCloserBackend
	// contains filtered or unexported fields
}

func NewFileBackend

func NewFileBackend(path string, options FileOptions) (b *FileBackend, err error)

func (*FileBackend) Path

func (this *FileBackend) Path() string

func (*FileBackend) Print

func (this *FileBackend) Print(args ...interface{}) (err error)

type FileOptions

type FileOptions struct {
	Async    bool
	Truncate bool
	Perm     os.FileMode
}

type HttpBackend

type HttpBackend struct {
	Client    *http.Client
	URL       url.URL
	HttpGet   bool
	Formatted bool

	Async  bool
	Logger logging.Logger
	// contains filtered or unexported fields
}

func NewHttpBackend

func NewHttpBackend(URL url.URL, opt HttpOptions, client *http.Client) (wsb *HttpBackend)

func (*HttpBackend) Close

func (this *HttpBackend) Close() error

func (*HttpBackend) Log

func (this *HttpBackend) Log(level logging.Level, calldepth int, rec *logging.Record) (err error)

func (*HttpBackend) Print

func (this *HttpBackend) Print(args ...interface{}) (err error)

type HttpOptions

type HttpOptions struct {
	Timeout   int
	Insecure  bool
	HttpGet   bool
	Formatted bool
	Async     bool
}

type WriteCloserBackend

type WriteCloserBackend struct {
	io.WriteCloser
	logging.Backend
	Name  string
	Async bool
}

func NewWriteCloserBackend

func NewWriteCloserBackend(name string, wc io.WriteCloser, async bool) *WriteCloserBackend

func (*WriteCloserBackend) Close

func (this *WriteCloserBackend) Close() error

func (*WriteCloserBackend) Log

func (this *WriteCloserBackend) Log(level logging.Level, calldepth int, rec *logging.Record) (err error)

Jump to

Keyboard shortcuts

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