hook

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

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

type OptionFunc

type OptionFunc func(*Option)

func SetLogstore added in v1.0.1

func SetLogstore(name string) OptionFunc

func SetProject

func SetProject(name string) OptionFunc

func SetSource

func SetSource(name string) OptionFunc

func SetTopic

func SetTopic(name string) OptionFunc

type SLSHook

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

func NewSLSHook

func NewSLSHook(producerConfig *producer.ProducerConfig, opts ...OptionFunc) *SLSHook

func (*SLSHook) Close

func (hook *SLSHook) Close(timeoutMs int64) error

func (*SLSHook) Fire

func (hook *SLSHook) Fire(entry *logrus.Entry) error

func (*SLSHook) Levels

func (hook *SLSHook) Levels() []logrus.Level

func (*SLSHook) SafeClose

func (hook *SLSHook) SafeClose()

Jump to

Keyboard shortcuts

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