redis

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool interface {
	Get() redigo.Conn
	Close() error
}

A Pool is used to retrieve pooled connections via it's Get method. When the pool is no longer in use - Close should be called to ensure all resources are released

type Sink

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

Sink can be used to sync zap logs with redis

func NewSink

func NewSink(key string, pool Pool) *Sink

NewSink construct a useful instance of zap logger sync that can be used to write logs to a remote redis instance

func (*Sink) Close

func (s *Sink) Close() error

Close closes the underlying connection pull. All future calls to a closed instance will fail

func (*Sink) Write

func (s *Sink) Write(p []byte) (n int, err error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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