markercache

package
v0.0.0-...-1b9946f Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMarkers = errors.New("no markers")

Functions

This section is empty.

Types

type GenMarkerFunc

type GenMarkerFunc func(projectID string) (*api.Marker, error)

type MarkerCache

type MarkerCache interface {
	// Pop retrieves and removes a marker from the cache
	Pop(ctx context.Context, projectID string) (*api.Marker, error)

	// Push returns unused markers to their project's cache
	Push(projectID string, markers ...*api.Marker) error

	// Queue notifies the workers that a project's cache
	// is most likely not full
	Queue(projectID string) error

	// Start begins the worker thread
	Start()

	// Close stops the worker thread
	Close() error
}

type ReceiveMarker

type ReceiveMarker struct {
	ProjectID string
	Marker    *api.Marker
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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