fake

package
v1.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	OnStop func()
	// contains filtered or unexported fields
}

Client is a fake client used for testing.

func NewClient

func NewClient(stop func()) *Client

func (*Client) Chan

func (c *Client) Chan() chan<- loki.Entry

func (*Client) Clear

func (c *Client) Clear()

Clear is used to cleanup the buffered received entries, so the same client can be re-used between test cases.

func (*Client) LogsReceiver

func (c *Client) LogsReceiver() loki.LogsReceiver

LogsReceiver returns this client as a LogsReceiver, which is useful in testing.

func (*Client) Name

func (c *Client) Name() string

func (*Client) Received

func (c *Client) Received() []loki.Entry

func (*Client) Stop

func (c *Client) Stop()

Stop implements client.Client

func (*Client) StopNow

func (c *Client) StopNow()

StopNow implements client.Client

Jump to

Keyboard shortcuts

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