busltee

package
v0.0.0-...-2ab7f6d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseLogs

func CloseLogs()

CloseLogs closes an open log file

func ConfigureLogs

func ConfigureLogs(logFile string, fields LogFields)

ConfigureLogs configures the log file

func Run

func Run(url string, args []string, conf *Config) (exitCode int)

Run creates the stdin listener and forwards logs to URI

Types

type Config

type Config struct {
	Insecure      bool
	Timeout       float64
	Retry         int
	StreamRetry   int
	SleepDuration time.Duration
	URL           string
	Args          []string
	LogFile       string
	RequestID     string
	Verbose       bool
}

Config holds the runner configuration

type LogFields

type LogFields map[string]string

LogFields stores all the custom fields

func (*LogFields) Set

func (l *LogFields) Set(value string) error

Set is used by the flag package to set new values

func (*LogFields) String

func (l *LogFields) String() string

type StreamBuffer

type StreamBuffer struct {
	io.ReadWriter
	// contains filtered or unexported fields
}

StreamBuffer is a buffer which doesn't get closed until we say it is So we can append data to it, and not get an EOF until everything has been sent.

func NewStreamBuffer

func NewStreamBuffer() *StreamBuffer

NewStreamBuffer creates a new StreamBuffer instance

func (*StreamBuffer) Close

func (s *StreamBuffer) Close() error

Close marks the buffer as closed

func (*StreamBuffer) Read

func (s *StreamBuffer) Read(p []byte) (int, error)

func (*StreamBuffer) Write

func (s *StreamBuffer) Write(p []byte) (n int, err error)

type Transport

type Transport struct {
	MaxRetries    uint
	Transport     http.RoundTripper
	SleepDuration time.Duration
	PingDuration  time.Duration
	// contains filtered or unexported fields
}

func (*Transport) Close

func (t *Transport) Close() error

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (res *http.Response, err error)

Jump to

Keyboard shortcuts

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