logclient

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const LogTimestampFormat = "2006-01-02T15:04:05.00-0700"

Variables

View Source
var CurrentTimezoneLocation = time.Now().Location()

Functions

func NewLogClientBuilder

func NewLogClientBuilder() *logClientBuilder

Types

type Consumer

type Consumer interface {
	SetRecentPathBuilder(b consumer.RecentPathBuilder)
	SetStreamPathBuilder(b consumer.StreamPathBuilder)
	SetDebugPrinter(debugPrinter consumer.DebugPrinter)
	RecentLogs(appGuid string, authToken string) ([]*events.LogMessage, error)
	TailingLogs(appGuid, authToken string) (<-chan *events.LogMessage, <-chan error)
}

Wrap interactions with NOAA consumer.consumer inside an interface whose behaviour can be faked in tests

type LogClient

type LogClient interface {
	RecentLogs(serviceGUID string, authToken string) ([]string, error)
	TailingLogs(serviceGUID string, authToken string) (<-chan string, <-chan error)
}

type LogClientBuilder

type LogClientBuilder interface {
	Endpoint(url string) LogClientBuilder
	InsecureSkipVerify(skipVerify bool) LogClientBuilder
	Build() LogClient
}

type Sorter

type Sorter interface {
	SortRecent(messages []*events.LogMessage) []*events.LogMessage
}

Wrap interactions with noaa.SortRecent inside an interface whose behaviour can be faked in tests

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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