infra

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFullMapCap = 1024
View Source
const DefaultPulledMapCap = 128

Variables

View Source
var ErrPathIsNotValid = errors.New("path is not valid")

Functions

func NewSnapshotFull added in v0.3.0

func NewSnapshotFull(db *pebble.DB) silo.Snapshot

func NewSnapshotInterateOnce added in v0.3.0

func NewSnapshotInterateOnce(db *pebble.DB) silo.Snapshot

Types

type Backend

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

func NewBackend

func NewBackend(path string) (Backend, error)

func (Backend) Close

func (b Backend) Close() error

func (Backend) Get

func (b Backend) Get(node silo.DataNode) ([]silo.DataNode, error)

func (Backend) Snapshot

func (b Backend) Snapshot() silo.Snapshot

func (Backend) Store

func (b Backend) Store(key silo.DataNode, value silo.DataNode) error

type BackendFull added in v0.3.0

type BackendFull struct {
	Backend
}

func NewBackendFull added in v0.3.0

func NewBackendFull(path string) (BackendFull, error)

func (BackendFull) Snapshot added in v0.3.0

func (b BackendFull) Snapshot() silo.Snapshot

type BackendInterateOnce added in v0.3.0

type BackendInterateOnce struct {
	Backend
}

func NewBackendInterateOnce added in v0.3.0

func NewBackendInterateOnce(path string) (BackendInterateOnce, error)

func (BackendInterateOnce) Snapshot added in v0.3.0

func (b BackendInterateOnce) Snapshot() silo.Snapshot

type BackendLogger

type BackendLogger struct{}

func (BackendLogger) Fatalf

func (l BackendLogger) Fatalf(format string, args ...interface{})

func (BackendLogger) Infof

func (l BackendLogger) Infof(format string, args ...interface{})

type DataRowReaderJSONLine

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

func NewDataRowReaderJSONLine

func NewDataRowReaderJSONLine() (*DataRowReaderJSONLine, error)

func NewDataRowReaderJSONLineFromFile

func NewDataRowReaderJSONLineFromFile(filename string) (*DataRowReaderJSONLine, error)

func (*DataRowReaderJSONLine) Close

func (drr *DataRowReaderJSONLine) Close() error

func (*DataRowReaderJSONLine) ReadDataRow

func (drr *DataRowReaderJSONLine) ReadDataRow() (silo.DataRow, error)

type DataRowReaderWriterJSONLine

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

func NewDataRowReaderWriterJSONLine

func NewDataRowReaderWriterJSONLine(input io.Reader, output io.Writer) *DataRowReaderWriterJSONLine

func (*DataRowReaderWriterJSONLine) Close

func (drr *DataRowReaderWriterJSONLine) Close() error

func (*DataRowReaderWriterJSONLine) ReadDataRow

func (drr *DataRowReaderWriterJSONLine) ReadDataRow() (silo.DataRow, error)

type DumpJSONLine

type DumpJSONLine struct{}

func NewDumpJSONLine

func NewDumpJSONLine() *DumpJSONLine

func (*DumpJSONLine) Close

func (d *DumpJSONLine) Close() error

func (*DumpJSONLine) Write

func (d *DumpJSONLine) Write(node silo.DataNode, uuid string) error

type DumpObserver added in v0.2.0

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

func NewDumpObserver added in v0.2.0

func NewDumpObserver() *DumpObserver

func (*DumpObserver) Close added in v0.2.0

func (o *DumpObserver) Close()

func (*DumpObserver) Entity added in v0.2.0

func (o *DumpObserver) Entity(status silo.Status, _ map[string]int)

type ScanObserver

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

func NewScanObserver

func NewScanObserver() *ScanObserver

func (*ScanObserver) Close

func (o *ScanObserver) Close()
func (o *ScanObserver) IngestedLink(_ silo.DataLink)

func (*ScanObserver) IngestedRow

func (o *ScanObserver) IngestedRow(_ silo.DataRow)

type Snapshot

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

func (Snapshot) Close

func (s Snapshot) Close() error

func (Snapshot) Next

func (s Snapshot) Next() (silo.DataNode, bool, error)

func (Snapshot) PullAll

func (s Snapshot) PullAll(node silo.DataNode) ([]silo.DataNode, error)

type SnapshotFull added in v0.3.0

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

func (*SnapshotFull) Close added in v0.3.0

func (s *SnapshotFull) Close() error

func (*SnapshotFull) Load added in v0.3.0

func (s *SnapshotFull) Load() error

func (*SnapshotFull) Next added in v0.3.0

func (s *SnapshotFull) Next() (silo.DataNode, bool, error)

func (*SnapshotFull) PullAll added in v0.3.0

func (s *SnapshotFull) PullAll(node silo.DataNode) ([]silo.DataNode, error)

type SnapshotInterateOnce added in v0.3.0

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

func (SnapshotInterateOnce) Close added in v0.3.0

func (s SnapshotInterateOnce) Close() error

func (SnapshotInterateOnce) Next added in v0.3.0

func (SnapshotInterateOnce) PullAll added in v0.3.0

func (s SnapshotInterateOnce) PullAll(node silo.DataNode) ([]silo.DataNode, error)

Jump to

Keyboard shortcuts

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