Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewObservable ¶
func NewObservable(v interface{}, f func()) luigi.Observable
NewObservable returns a regular observable that calls f when the last registration is cancelled. This is used to garbage-collect observables from the maps in the indexes.
Types ¶
type Addr ¶
type Addr string
Addr is an address (or key) in the index. TODO maybe not use a string but a Stringer or
type Index ¶
type Index interface { // Get returns the an observable of the value stored at the address. // Getting an unset value retuns a valid Observable with a value // of type Unset and a nil error. Get(context.Context, Addr) (luigi.Observable, error) }
Index provides an index table keyed by Addr. Often also implements Setter.
type SeqSetterIndex ¶
type SetterIndex ¶
SetterIndex is an index that can be updated using calls to Set and Delete.
type SinkIndex ¶
SinkIndex is an index that is updated by processing a stream.
func NewSinkIndex ¶
func NewSinkIndex(f StreamProcFunc, idx SeqSetterIndex) SinkIndex
type StreamProcFunc ¶
type StreamProcFunc func(context.Context, int64, interface{}, SetterIndex) error
type UnsetValue ¶
type UnsetValue struct {
Addr Addr
}
UnsetValue is the value of observable returned by idx.Get() when the requested address has not been set yet.
Click to show internal directories.
Click to hide internal directories.