client

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.5.0

func Get() *bytes.Buffer

Get retrieves a buffer from the pool and resets it for use. The caller must return the buffer using Put when done.

func Put added in v0.5.0

func Put(buf *bytes.Buffer)

Put returns a buffer to the pool for reuse. Buffers exceeding maxBufferSize are discarded to prevent memory leaks.

Types

type Client

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

Client handles HTTP communication with Loki server.

func NewClient

func NewClient(baseURL string, username string, password string, timeout time.Duration, maxRetries int) *Client

NewClient creates a new Loki HTTP client.

func (*Client) Push

func (c *Client) Push(ctx context.Context, entries []*types.Entry) error

Push sends log entries to Loki with automatic retries.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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