fsregistry

package
v0.0.0-...-dc806d7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ErrAnomalySize = "Size Anomaly"
View Source
const ErrAnomalyTypeAssertion = "Type Assertion Anomaly"

Variables

This section is empty.

Functions

func Clear

func Clear(registry *Registry)

Clears the Registry.

Types

type Record

type Record struct {
	// Usable Record Data.
	Data interface{}
	// contains filtered or unexported fields
}

func (*Record) GetTimeOfCreation

func (record *Record) GetTimeOfCreation() int64

Gets the Creation Time of a Record.

type Registry

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

func New

func New(capacity uint64) *Registry

Creates a new Registry and returns a Pointer directed at it.

func (*Registry) AddARecord

func (registry *Registry) AddARecord(record *Record) bool

Adds a Record to the Registry.

func (*Registry) GetLastRecord

func (registry *Registry) GetLastRecord() (*Record, uint64)

Gets the last Record from the Registry (if it is possible) and the Registry Size.

func (*Registry) GetSize

func (registry *Registry) GetSize() uint64

Gets the actual Size of the Registry, the Number of Records actually stored.

func (*Registry) GetStoredRecords

func (registry *Registry) GetStoredRecords() ([]*Record, uint64)

Gets all stored Records from the Registry and their Quantity.

Jump to

Keyboard shortcuts

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