dozorclient

package
v1.32.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 6 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 {
	// contains filtered or unexported fields
}

Client is an HTTP client for the dozor sidecar API.

func NewClient

func NewClient(baseURL, token string, timeout time.Duration) *Client

NewClient creates a new dozor Client. token may be empty (no auth header sent).

func (*Client) GetLogs

func (c *Client) GetLogs(ctx context.Context, service string, since, until time.Time, grep string, limit int) (*LogsResponse, error)

GetLogs fetches log lines from dozor for the given service and time window. since and until are optional (zero value means omit). grep is optional (empty means server applies its default filter: panic|fatal|error). limit <= 0 means use the server default.

type LogLine

type LogLine struct {
	Ts    string `json:"ts"`
	Level string `json:"level"`
	Msg   string `json:"msg"`
	Raw   string `json:"raw"`
}

LogLine is a single parsed log entry from the dozor /api/logs response.

type LogsResponse

type LogsResponse struct {
	Service     string    `json:"service"`
	ContainerID string    `json:"container_id"`
	Lines       []LogLine `json:"lines"`
	Truncated   bool      `json:"truncated"`
}

LogsResponse is the full response body from dozor /api/logs.

Jump to

Keyboard shortcuts

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