config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Overview

Package config defines logger configuration

Index

Constants

View Source
const MaxRetries = 100

MaxRetries max event firing retry limit

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Command    string
	Args       []string
	URL        string
	Params     map[string]string
	MaxRetries int
}

Event represents an rotation event

func (*Event) Init

func (c *Event) Init()

Init initialises an event

type Rotation

type Rotation struct {
	EveryMs    int
	MaxEntries int
	URL        string
	Codec      string
	Emit       *Event
	// contains filtered or unexported fields
}

Rotation rotation rotation config

func (*Rotation) ExpandURL

func (r *Rotation) ExpandURL(t time.Time, ID string) string

ExpandURL expand rotation URL with log sequence, time and ID

func (Rotation) ExpiryTime

func (r Rotation) ExpiryTime(created time.Time) *time.Time

ExpiryTime returns expiry time

func (*Rotation) Init

func (r *Rotation) Init()

Init initialises rotation

func (*Rotation) IsGzip

func (r *Rotation) IsGzip() bool

IsGzip returns true if gzip codec specified

type Stream

type Stream struct {
	//Rotation represents optional log stream rotation
	Rotation     *Rotation
	FlushMod     int    //flush module to be set only for local testing
	URL          string //destination URL
	Codec        string //compression codec
	StreamUpload bool   //streams controls progressive upload to s3, g3 (skip checkup)
}

Stream represents log stream

func (*Stream) Init

func (s *Stream) Init()

Init initialises log stream

func (*Stream) IsGzip

func (s *Stream) IsGzip() bool

IsGzip returns true if gzip codec specified

Jump to

Keyboard shortcuts

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