internal

package
v0.0.0-...-baa17e1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(level zerolog.Level, console, noblock bool) zerolog.Logger

NewLogger creates a new instance zerolog logger.

Types

type LogOption

type LogOption func(*zerolog.Logger)

type Session

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

Session is a session context storage. It is used to store context that must be shared during whole session. Device id for instance.

func NewSession

func NewSession() *Session

NewSession creates a new session context storage.

func (*Session) Device

func (s *Session) Device() string

GetDevice returns the device id from session context.

func (*Session) Get

func (s *Session) Get(key string) interface{}

Get returns the value associated with the given key.

func (*Session) Set

func (s *Session) Set(key string, value interface{})

Set sets a value for a given key.

func (*Session) SetDevice

func (s *Session) SetDevice(dev string)

SetDevice sets the device id to session context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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