Categorygithub.com/cloudfoundry/go-log-cache
modulepackage
1.0.0
Repository: https://github.com/cloudfoundry/go-log-cache.git
Documentation: pkg.go.dev

# README

Go Log Cache

GoDoc travis slack.cloudfoundry.org

This is a golang client library for Log-Cache.

Usage

This repository should be imported as:

import logcache "code.cloudfoundry.org/go-log-cache"

# Packages

No description provided by the author
No description provided by the author

# Functions

BuildWalker captures the sourceID and reader to be used with a Walker.
NewAlwaysRetryBackoff returns a new AlwaysRetryBackoff.
NewIngressClient creates a Client.
NewGroupReaderClient creates a GroupReaderClient.
NewOauth2HTTPClient creates a new Oauth2HTTPClient.
NewRetryBackoff returns a new RetryBackoff.
NewRetryBackoffOnErr returns a new RetryBackoff that only backs off no errors.
Walk reads from the LogCache until the Visitor returns false.
Window crawls a reader incrementally to give the Visitor a batch of envelopes.
WithDescending set the 'descending' query parameter to true.
WithEndTime sets the 'end_time' query parameter to the given time.
WithEnvelopeTypes sets the 'envelope_types' query parameter to the given value.
WithHTTPClient sets the HTTP client.
WithLimit sets the 'limit' query parameter to the given value.
WithOauth2HTTPClient sets the HTTPClient for the Oauth2HTTPClient.
WithUser sets the username and password for user authentication.
WithViaGRPC enables gRPC instead of HTTP/1 for reading from LogCache.
WithWalkBackoff sets the backoff strategy for an empty batch or error.
WithWalkEndTime sets the end time of the query.
WithWalkEnvelopeType sets the envelope_types of the query.
WithWalkLimit sets the limit of the query.
WithWalkLogger is used to set the logger for the Walk.
WithWalkStartTime sets the start time of the query.
WithWindowInterval sets the duration to advance the start and end of the query.
WithWindowLogger is used to set the logger for the Walk.
WithWindowStartTime sets the start time of the query.
WithWindowWidth sets the width (end-start=width) of the query.

# Structs

AlwaysDoneBackoff returns false for both OnErr and OnEmpty.
AlwaysRetryBackoff returns true for both OnErr and OnEmpty after sleeping the given interval.
Client reads from LogCache via the RESTful or gRPC API.
GroupMeta gives the information about given group.
GroupReaderClient reads and interacts from LogCache via the RESTful or gRPC Group API.
Oauth2HTTPClient sets the "Authorization" header of any outgoing request.
RetryBackoff returns true for both OnErr and OnEmpty after sleeping the given interval for a limited number of times.

# Interfaces

Backoff is used to determine what to do if there is an empty batch or error.
ClientOption configures the LogCache client.
HTTPClient is an interface that represents a http.Client.
Oauth2Option configures the Oauth2HTTPClient.
WalkOption overrides defaults for Walk.
WindowOption configures the Window algorithm.

# Type aliases

Reader reads envelopes from LogCache.
ReadOption configures the URL that is used to submit the query.
Visitor is invoked for each envelope batch.
Walker walks a reader.