writer

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidOutputLocation

func ValidOutputLocation(output string) bool

Types

type FileWriter

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

FileWriter is a writer that writes to a file.

func NewFileWriter

func NewFileWriter(filename string, logger logger.Logger) (*FileWriter, error)

NewFileWriter creates a new FileWriter.

func (*FileWriter) Close

func (f *FileWriter) Close() error

Close closes the file.

func (*FileWriter) Write

func (f *FileWriter) Write(line string)

Write writes a line to the file.

type MemoryWriter

type MemoryWriter struct {
	Lines []string
}

func (*MemoryWriter) Close

func (m *MemoryWriter) Close() error

func (*MemoryWriter) Write

func (m *MemoryWriter) Write(line string)

type NoopWriter

type NoopWriter struct{}

NoopWriter is a writer that does nothing.

func (*NoopWriter) Close

func (n *NoopWriter) Close() error

func (*NoopWriter) Write

func (n *NoopWriter) Write(_ string)

type StderrWriter

type StderrWriter struct{}

StderrWriter is a writer that writes to stderr.

func (*StderrWriter) Close

func (s *StderrWriter) Close() error

func (*StderrWriter) Write

func (s *StderrWriter) Write(line string)

type StdoutWriter

type StdoutWriter struct{}

StdoutWriter is a writer that writes to stdout.

func (*StdoutWriter) Close

func (s *StdoutWriter) Close() error

func (*StdoutWriter) Write

func (s *StdoutWriter) Write(line string)

type UdpWriter

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

func NewUdpWriter

func NewUdpWriter(address string, logger logger.Logger) (*UdpWriter, error)

func (*UdpWriter) Close

func (u *UdpWriter) Close() error

func (*UdpWriter) Write

func (u *UdpWriter) Write(line string)

type UnixgramWriter

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

func NewUnixgramWriter

func NewUnixgramWriter(path string, logger logger.Logger) (*UnixgramWriter, error)

func (*UnixgramWriter) Close

func (u *UnixgramWriter) Close() error

func (*UnixgramWriter) Write

func (u *UnixgramWriter) Write(line string)

type Writer

type Writer interface {
	Write(line string)
	Close() error
}

Writer that accepts SpectatorD line protocol.

func NewWriter

func NewWriter(outputLocation string, logger logger.Logger) (Writer, error)

NewWriter Create a new writer based on the GetLocation string provided

Jump to

Keyboard shortcuts

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