cache

package
v2.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncCache

type SyncCache struct {
	CacheLength int // readonly, for metrics only to save calculation
	// contains filtered or unexported fields
}

func NewSyncCache

func NewSyncCache(ctx api.StreamContext, cacheConf *conf.SinkConf) (*SyncCache, error)

func (*SyncCache) AddCache

func (c *SyncCache) AddCache(ctx api.StreamContext, item any) error

AddCache not thread safe!

func (*SyncCache) Flush

func (c *SyncCache) Flush(ctx api.StreamContext)

Flush save memory states to disk.

func (*SyncCache) PopCache

func (c *SyncCache) PopCache(ctx api.StreamContext) (any, bool)

PopCache not thread safe!

Jump to

Keyboard shortcuts

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