compdb

package
v0.11.10 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MPL-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedOperation = errors.New("unsupported operation")
	ErrDuplicatedObjectById = errors.New("duplicated object by id")
)

Functions

This section is empty.

Types

type ConsistentStore

type ConsistentStore interface {
	// contains filtered or unexported methods
}

type SimpleStore

type SimpleStore interface {
	Table(table string) SimpleStoreTable
}

type SimpleStoreObject

type SimpleStoreObject interface {
	Id() []byte

	Marshal() ([]byte, error)
	Unmarshal(data []byte) error
}

type SimpleStoreObjectIndexElement

type SimpleStoreObjectIndexElement interface {
	IndexName() string
	Value() []byte
	Unique() bool
}

type SimpleStoreTable

type SimpleStoreTable interface {
	// QueryById accepts an empty object to be filled with data by the given id
	// If no object is found, then the nil object will be returned.
	QueryById(id []byte, empty SimpleStoreObject) (SimpleStoreObject, error)
	Insert(obj SimpleStoreObject) error
	Delete(id []byte) error
	Update(obj SimpleStoreObject) error
}

type WatchEvent

type WatchEvent struct {
	// Path is the full path of the element
	Path string
	Ev   []struct {
		Key       string
		EventType WatchEventType
	}
}

type WatchEventType

type WatchEventType int
const (
	WatchEventUnknown WatchEventType = iota
	WatchEventFresh
	WatchEventCreated
	WatchEventModified
	WatchEventDelete
)

Jump to

Keyboard shortcuts

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