Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 state

Back to all declarations

Cap

untyped bigint

Cap is the maximum number of messages the ring buffer holds.

Value

(16 <untyped> bigint)

Entry

type

Entry is a single posted message.

Value

v0.Entry

head

int

// index of the next write slot

Value

0

count

int

// number of entries currently stored (0 ≤ count ≤ Cap)

Value

0

Post

func(msg string)

Post adds a message to the ring buffer. Once Cap entries are stored, the oldest entry is overwritten.

Open
OID
0165bf…5d9d:23
Post details

Inspect func

Entries

func() []v0.Entry

Entries returns all stored messages in chronological order (oldest first).

Open
OID
0165bf…5d9d:25
Entries details

Inspect func

Len

func() int

Len returns the number of messages currently stored.

Open
OID
0165bf…5d9d:26
Len details

Inspect func

Render

func(path string) string

Render displays the ring buffer as a Markdown page.

Open
OID
0165bf…5d9d:27
Render details

Inspect func

shorten

func(s string) string

shorten trims a long address for display.

Open
OID
0165bf…5d9d:28
shorten details

Inspect func
Cap : untyped bigint =(16 <untyped> bigint)
Entry : type =v0.Entry
buf : [16]v0.Entry Inspect
head : int =0
count : int =0
Post : func(msg string) Inspect
Entries : func() []v0.Entry Inspect
Len : func() int Inspect
Render : func(path string) string Inspect
shorten : func(s string) string Inspect