ali

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCore

func NewCore(ops ...Option) (zapcore.Core, func() error)

NewCore creates a Core that writes logs to a WriteSyncer.

func NewMapObjEncoder

func NewMapObjEncoder(cfg zapcore.EncoderConfig) *mapObjEncoder

Types

type LogContent

type LogContent = pb.Log_Content

type LogProject

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

LogProject defines the Ali project detail

func (*LogProject) GetLogStore

func (p *LogProject) GetLogStore(name string) (s *LogStore, err error)

GetLogStore returns logstore according by logstore name.

func (*LogProject) ListLogStore

func (p *LogProject) ListLogStore() (storeNames []string, err error)

ListLogStore returns all logstore names of project p.

type LogStore

type LogStore struct {
	Name           string `json:"logstoreName"`
	TTL            int
	ShardCount     int
	CreateTime     uint32
	LastModifyTime uint32
	// contains filtered or unexported fields
}

LogStore stores the logs

func (*LogStore) PutLogs

func (s *LogStore) PutLogs(lg *pb.LogGroup) (err error)

PutLogs puts logs into logstore. The callers should transform user logs into LogGroup.

type Option

type Option func(c *config)

func WithAccessKeyID

func WithAccessKeyID(akID string) Option

func WithAccessKeySecret

func WithAccessKeySecret(akSecret string) Option

func WithApiBulkSize

func WithApiBulkSize(apiBulkSize int) Option

func WithApiRetryCount

func WithApiRetryCount(apiRetryCount int) Option

func WithApiRetryMaxWaitTime

func WithApiRetryMaxWaitTime(apiRetryMaxWaitTime time.Duration) Option

func WithApiRetryWaitTime

func WithApiRetryWaitTime(apiRetryWaitTime time.Duration) Option

func WithApiTimeout

func WithApiTimeout(apiTimeout time.Duration) Option

func WithEncoder

func WithEncoder(enc zapcore.Encoder) Option

func WithEndpoint

func WithEndpoint(endpoint string) Option

func WithFallbackCore

func WithFallbackCore(core zapcore.Core) Option

func WithFlushBufferInterval

func WithFlushBufferInterval(flushBufferInterval time.Duration) Option

func WithFlushBufferSize

func WithFlushBufferSize(flushBufferSize int) Option

func WithLevelEnabler

func WithLevelEnabler(lv zapcore.LevelEnabler) Option

func WithLogstore

func WithLogstore(logStore string) Option

func WithProject

func WithProject(project string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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