logset

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogBucket

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

func (*LogBucket) CreateReader

func (b *LogBucket) CreateReader(id string) (io.ReadCloser, error)

func (*LogBucket) CreateWriter

func (b *LogBucket) CreateWriter(id string, ws ...io.Writer) (io.Writer, error)

func (*LogBucket) IsFile

func (b *LogBucket) IsFile() bool

func (*LogBucket) IsStdout

func (b *LogBucket) IsStdout() bool

func (*LogBucket) Reset

func (b *LogBucket) Reset() error

type Logset

type Logset struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Logset be used to log as a log service.

func New

func New(opts ...LogsetOption) *Logset

func (*Logset) CreateBucket

func (s *Logset) CreateBucket(bucketid string) *LogBucket

CreateBucket create a new bucket object that can be used to write the output content.

func (*Logset) GetBucket

func (s *Logset) GetBucket(bucketid string) (*LogBucket, error)

GetBucket returns the bucket object by bucketid.

func (*Logset) Restore

func (s *Logset) Restore() error

Restore restore all buckets from the log directory.

type LogsetOption

type LogsetOption func(*Logset)

func WithAddr

func WithAddr(addr string) LogsetOption

func WithStdout

func WithStdout() LogsetOption

Jump to

Keyboard shortcuts

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