logging

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketObjectEvent

type BucketObjectEvent struct {
	ResourceName string
	ObjectName   string
	Timestamp    time.Time
	Type         ObjectEvent
}

BucketObjectEvent represent a bucket event log

func (BucketObjectEvent) String

func (b BucketObjectEvent) String() string

type DefaultLoggingClient

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

DefaultLoggingClient represent logging client

func NewLoggingClient

func NewLoggingClient(ctxIn context.Context, targetPrincipalProvider impersonate.TargetPrincipalForProjectProvider, srcProjectID, targetProjectID string) (*DefaultLoggingClient, error)

NewLoggingClient creates new DefaultLoggingClient

func (*DefaultLoggingClient) Close

func (l *DefaultLoggingClient) Close()

Close terminates terminates all resources in use

func (*DefaultLoggingClient) IterateOverBucketObjectEvents

func (l *DefaultLoggingClient) IterateOverBucketObjectEvents(ctxIn context.Context, backup *repository.Backup, bucketName string, timestampStart time.Time, iterationDeadline time.Time, consumeFunc func(obj []BucketObjectEvent, eventType ObjectEvent) error) (time.Time, error)

IterateOverBucketObjectEvents reads events log for a given bucket

type ObjectEvent

type ObjectEvent string

ObjectEvent represent change of bucket object

const Create ObjectEvent = "Add"

Create object was created

const Delete ObjectEvent = "Delete"

Delete objects was deleted

Jump to

Keyboard shortcuts

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