cache

package
v2.0.1-0...-a2232c2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Read() (cache []string, epoch int64)

	ReadFrom(startTime int64) (cache []string, epoch int64)

	Write(b []byte) (n int, err error)
}

type MemoryCache

type MemoryCache struct {
	Cache
	Buffer   []Message
	Capacity int
}

func (*MemoryCache) Read

func (c *MemoryCache) Read() (msg []string, lastTime int64)

func (*MemoryCache) ReadFrom

func (c *MemoryCache) ReadFrom(startTime int64) (msg []string, lastTime int64)

func (*MemoryCache) Write

func (c *MemoryCache) Write(b []byte) (n int, err error)

type Message

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

Jump to

Keyboard shortcuts

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