context

package
v0.0.0-...-9a491fe Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: MIT, MIT Imports: 5 Imported by: 25

README

Context GoDoc

context meets logrus.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Canceled = context.Canceled

Functions

This section is empty.

Types

type Context

type Context interface {
	context.Context
	Logger
}

func Background

func Background() Context

func WithCancel

func WithCancel(parent Context) (Context, context.CancelFunc)

func TODO() Context

func WithDeadline

func WithDeadline(parent Context, deadline time.Time) (Context, context.CancelFunc)

func WithTimeout

func WithTimeout(parent Context, timeout time.Duration) (Context, context.CancelFunc)

func WithValue

func WithValue(parent Context, key string, value interface{}) Context

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Debugln(args ...interface{})

	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Errorln(args ...interface{})

	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Infoln(args ...interface{})

	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
	Fatalln(args ...interface{})

	Print(args ...interface{})
	Printf(format string, args ...interface{})
	Println(args ...interface{})

	Warn(args ...interface{})
	Warnf(format string, args ...interface{})
	Warnln(args ...interface{})
}

Jump to

Keyboard shortcuts

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