package
2.3.1+incompatible
Repository: https://github.com/cloudfoundry/log-cache.git
Documentation: pkg.go.dev
# README
Log Cache Client
This is a golang client library for Log-Cache.
Usage
This repository should be imported as:
import logcache "code.cloudfoundry.org/log-cache/pkg/client"
NOTE: This client library is compatible with log-cache
versions 1.5.x and
above. For versions 1.4.x and below, please use go-log-cache
.
Also, the master branch of log-cache/pkg/client
reflects current (potentially
development) state of log-cache-release
. Branches are provided for
compatibility with released versions of log-cache
.
# Packages
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.
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.
No description provided by the author
WithOauth2HTTPClient sets the HTTPClient for the Oauth2HTTPClient.
WithOauth2HTTPUser sets the username and password for user authentication.
No description provided by the author
No description provided by the author
No description provided by the author
WithPromQLTime returns a PromQLOption that configures the 'time' query parameter for a PromQL query.
WithViaGRPC enables gRPC instead of HTTP/1 for reading from LogCache.
WithWalkBackoff sets the backoff strategy for an empty batch or error.
WithWalkDelay sets the value that the walk algorithm will consider "old" enough.
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.
No description provided by the author
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.
# Variables
No description provided by the author
No description provided by the author
# 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.
Oauth2HTTPClient sets the "Authorization" header of any outgoing request.
No description provided by the author
No description provided by the author
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
PromQLOption configures the URL that is used to submit the query.
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.