ring

package
v0.0.2-0...-1c7e8a7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error) bool

func Debug

func Debug(a ...interface{})

func Debugc

func Debugc(fn func() string)

func Debugf

func Debugf(format string, a ...interface{})

func Debugs

func Debugs(a interface{})

func Error

func Error(a ...interface{})

func Errorc

func Errorc(fn func() string)

func Errorf

func Errorf(format string, a ...interface{})

func Errors

func Errors(a interface{})

func Fatal

func Fatal(a ...interface{})

func Fatalc

func Fatalc(fn func() string)

func Fatalf

func Fatalf(format string, a ...interface{})

func Fatals

func Fatals(a interface{})

func Info

func Info(a ...interface{})

func Infoc

func Infoc(fn func() string)

func Infof

func Infof(format string, a ...interface{})

func Infos

func Infos(a interface{})

func Trace

func Trace(a ...interface{})

func Tracec

func Tracec(fn func() string)

func Tracef

func Tracef(format string, a ...interface{})

func Traces

func Traces(a interface{})

func Warn

func Warn(a ...interface{})

func Warnc

func Warnc(fn func() string)

func Warnf

func Warnf(format string, a ...interface{})

func Warns

func Warns(a interface{})

Types

type BufferFloat64

type BufferFloat64 struct {
	Buf    []float64
	Cursor int
	Full   bool
}

func NewBufferFloat64

func NewBufferFloat64(size int) *BufferFloat64

func (*BufferFloat64) Add

func (b *BufferFloat64) Add(value float64)

func (*BufferFloat64) ForEach

func (b *BufferFloat64) ForEach(fn func(v float64) error) (err error)

func (*BufferFloat64) Get

func (b *BufferFloat64) Get(index int) (out *float64)

Get returns the value at the given index or nil if nothing

func (*BufferFloat64) Len

func (b *BufferFloat64) Len() (length int)

type BufferUint64

type BufferUint64 struct {
	Buf    []uint64
	Cursor int
	Full   bool
}

func NewBufferUint64

func NewBufferUint64(size int) *BufferUint64

func (*BufferUint64) Add

func (b *BufferUint64) Add(value uint64)

func (*BufferUint64) ForEach

func (b *BufferUint64) ForEach(fn func(v uint64) error) (err error)

func (*BufferUint64) Get

func (b *BufferUint64) Get(index int) (out *uint64)

Get returns the value at the given index or nil if nothing

type Entry

type Entry struct {
	Sem     semaphore.Semaphore
	Buf     []*logi.Entry
	Cursor  int
	Full    bool
	Clicked int
}

func NewEntry

func NewEntry(size int) *Entry

func (*Entry) Add

func (b *Entry) Add(value *logi.Entry)

func (*Entry) Clear

func (b *Entry) Clear()

Clear sets the buffer back to initial state

func (*Entry) ForEach

func (b *Entry) ForEach(fn func(v *logi.Entry) error) (err error)

func (*Entry) Get

func (b *Entry) Get(i int) (out *logi.Entry)

Get returns the value at the given index or nil if nothing

func (*Entry) Len

func (b *Entry) Len() (out int)

Len returns the length of the buffer

Jump to

Keyboard shortcuts

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