core

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNodFound = errors.New("key not found!")
)

Functions

This section is empty.

Types

type Context

type Context struct {
	sync.RWMutex // Read Write mutex, guards access to internal map.
	// contains filtered or unexported fields
}

func NewContext

func NewContext(ctx context.Context) *Context

func (*Context) Close

func (c *Context) Close() error

func (*Context) Count

func (c *Context) Count() int

func (*Context) Deadline

func (c *Context) Deadline() (deadline time.Time, ok bool)

func (*Context) Done

func (c *Context) Done() <-chan struct{}

func (*Context) Err

func (c *Context) Err() error

func (*Context) Get

func (c *Context) Get(key string) (interface{}, error)

func (*Context) GetBoolean

func (c *Context) GetBoolean(key string) (bool, error)

func (*Context) GetString

func (c *Context) GetString(key string) (string, error)

func (*Context) MustGet

func (c *Context) MustGet(key string) (value interface{})

func (*Context) MustGetBoolean

func (c *Context) MustGetBoolean(key string) bool

func (*Context) MustGetString

func (c *Context) MustGetString(key string) string

func (*Context) Set

func (c *Context) Set(key string, value interface{}) error

func (*Context) Value

func (c *Context) Value(key interface{}) interface{}

func (*Context) With

func (c *Context) With(handlers ...Provider) *Context

type Provider

type Provider interface {
	Register(ctx *Context) error
	Close(ctx *Context) error
}

Jump to

Keyboard shortcuts

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