cloudlogging

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package cloudlogging pulls lumberjack/data access logs from GCP cloud logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(h *Puller) *Puller

Option is the option to set up an log puller.

func WithRetry

func WithRetry(b retry.Backoff) Option

WithRetry provides retry strategy to the log puller.

type Puller

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

Puller pulls log entries of GCP organizations, folders, projects, and billingAccounts.

func NewPuller

func NewPuller(ctx context.Context, c *logging.Client, resource string, opts ...Option) *Puller

NewPuller creates a new Puller with provided clients and options.

func (*Puller) Pull

func (p *Puller) Pull(ctx context.Context, filter string, maxCount int) ([]*loggingpb.LogEntry, error)

Pull pulls up to maxCount of log entries for the given log filter.

func (*Puller) StreamPull

func (p *Puller) StreamPull(ctx context.Context, filter string, logCh chan<- *loggingpb.LogEntry) (rErr error)

SteamPull pulls live log entries, it won't stop until a cancel signal happens.

Jump to

Keyboard shortcuts

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