ali

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: MIT Imports: 31 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.

Types

type LogContent

type LogContent = pb.Log_Content

LogContent ...

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 MapObjEncoder added in v0.4.0

type MapObjEncoder struct {
	*zapcore.EncoderConfig

	*zapcore.MapObjectEncoder
	// contains filtered or unexported fields
}

MapObjEncoder ...

func NewMapObjEncoder

func NewMapObjEncoder(cfg zapcore.EncoderConfig) *MapObjEncoder

NewMapObjEncoder ...

func (*MapObjEncoder) Clone added in v0.4.0

func (e *MapObjEncoder) Clone() zapcore.Encoder

Clone ...

func (*MapObjEncoder) EncodeEntry added in v0.4.0

func (e *MapObjEncoder) EncodeEntry(ent zapcore.Entry, fields []zapcore.Field) (*buffer.Buffer, error)

EncodeEntry ...

type Option

type Option func(c *config)

Option 可选项

func WithAPIBulkSize added in v0.4.0

func WithAPIBulkSize(apiBulkSize int) Option

WithAPIBulkSize ...

func WithAPIIdleConnTimeout added in v0.4.0

func WithAPIIdleConnTimeout(apiIdleConnTimeout time.Duration) Option

WithAPIIdleConnTimeout ...

func WithAPIMaxIdleConns added in v0.4.0

func WithAPIMaxIdleConns(apiMaxIdleConns int) Option

WithAPIMaxIdleConns ...

func WithAPIMaxIdleConnsPerHost added in v0.4.0

func WithAPIMaxIdleConnsPerHost(apiMaxIdleConnsPerHost int) Option

WithAPIMaxIdleConnsPerHost ...

func WithAPIRetryCount added in v0.4.0

func WithAPIRetryCount(apiRetryCount int) Option

WithAPIRetryCount ...

func WithAPIRetryMaxWaitTime added in v0.4.0

func WithAPIRetryMaxWaitTime(apiRetryMaxWaitTime time.Duration) Option

WithAPIRetryMaxWaitTime ...

func WithAPIRetryWaitTime added in v0.4.0

func WithAPIRetryWaitTime(apiRetryWaitTime time.Duration) Option

WithAPIRetryWaitTime ...

func WithAPITimeout added in v0.4.0

func WithAPITimeout(apiTimeout time.Duration) Option

WithAPITimeout ...

func WithAccessKeyID

func WithAccessKeyID(akID string) Option

WithAccessKeyID ...

func WithAccessKeySecret

func WithAccessKeySecret(akSecret string) Option

WithAccessKeySecret ....

func WithEncoder

func WithEncoder(enc zapcore.Encoder) Option

WithEncoder ...

func WithEndpoint

func WithEndpoint(endpoint string) Option

WithEndpoint ...

func WithFallbackCore

func WithFallbackCore(core zapcore.Core) Option

WithFallbackCore ...

func WithFlushBufferInterval

func WithFlushBufferInterval(flushBufferInterval time.Duration) Option

WithFlushBufferInterval ...

func WithFlushBufferSize

func WithFlushBufferSize(flushBufferSize int) Option

WithFlushBufferSize ...

func WithLevelEnabler

func WithLevelEnabler(lv zapcore.LevelEnabler) Option

WithLevelEnabler ...

func WithLogstore

func WithLogstore(logStore string) Option

WithLogstore ...

func WithMaxQueueSize added in v0.5.7

func WithMaxQueueSize(maxQueueSize int) Option

WithMaxQueueSize ...

func WithProject

func WithProject(project string) Option

WithProject ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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