Documentation ¶
Index ¶
- Variables
- type AbstractPublisher
- type AbstractSubscriber
- type Cmd
- type DeleteEvent
- type DeleteRow
- type Fields
- type ForeignKey
- type Index
- func (index *Index) AddPublisher(publisher *AbstractPublisher)
- func (index *Index) GetAllMapping() map[string]any
- func (index *Index) GetAllRelations() Relations
- func (index *Index) GetAllRelationsAsView() Relations
- func (index *Index) IndexAllDocuments()
- func (index *Index) Init(config map[string]interface{})
- func (index *Index) Parse(config map[string]interface{}) error
- func (index *Index) SetSubscriber(subscriber *AbstractSubscriber)
- func (index *Index) Terminate()
- type InsertEvent
- type InsertsRow
- type Plugin
- type Plugins
- type Record
- type Relation
- type RelationUpdateEvent
- type Relations
- type RelationsUpdate
- type ScriptedField
- type SimpleField
- type UpdateEvent
- type UpdateRow
- type WaitingEvents
- type Where
- type Wheres
Constants ¶
This section is empty.
Variables ¶
View Source
var InterruptTimeout = 200 * time.Millisecond
InterruptTimeout timeout for interrupt signal when exiting a Cmd
View Source
var KillTimeout = 1000 * time.Millisecond
KillTimeout timeout for kill signal when exiting a Cmd
Functions ¶
This section is empty.
Types ¶
type AbstractPublisher ¶
type AbstractSubscriber ¶
type AbstractSubscriber interface { Init(config map[string]any) PrepareListen(indices []*Index) Listen() Terminate() InternalInit(eventChannel *chan *interface{}, name string) InternalTerminate() DispatchEvent(event *interface{}) GetAllRecordsForIndex(index *Index) <-chan Record GetFullRecordsForIndex(references []string, index *Index) <-chan Record GetFullRecordsForRelationUpdate(results RelationsUpdate, index *Index) <-chan Record }
type Cmd ¶
type Cmd struct { *exec.Cmd // Prefix prepended to outputs if provided OutputPrefix string // ShowOutput prints output to log ShowOutput bool // DropEmptyLines stops empty lines being received DropEmptyLines bool // InputChan is the channel attached to the command stdin InputChan chan string // OutputChan is the channel attached to the command stdout OutputChan chan string }
Cmd wraps an exec/Cmd and provides a pipe based interface
func (*Cmd) Exit ¶
Exit a running command This attempts a wait, with timeout based interrupt and kill signals
type DeleteEvent ¶
type Fields ¶
type Fields struct { Simple []*SimpleField Scripted []*ScriptedField }
type ForeignKey ¶
type Index ¶
type Index struct { Name string Table string Fields Fields Relations Relations Wheres Wheres ReferenceField string Settings map[string]any Mappings map[string]any Plugins Plugins Subscriber *AbstractSubscriber Publishers []*AbstractPublisher ChunkSize int WaitingEvents *WaitingEvents Logger *zerolog.Logger Active bool }
func (*Index) AddPublisher ¶
func (index *Index) AddPublisher(publisher *AbstractPublisher)
func (*Index) GetAllMapping ¶
func (*Index) GetAllRelations ¶
func (*Index) GetAllRelationsAsView ¶
func (*Index) IndexAllDocuments ¶
func (index *Index) IndexAllDocuments()
func (*Index) SetSubscriber ¶
func (index *Index) SetSubscriber(subscriber *AbstractSubscriber)
type InsertEvent ¶
type InsertsRow ¶
type Plugin ¶
type Relation ¶
type Relation struct { Table string Name string Type string // 'one_to_one', 'one_to_many', 'many_to_many' SoftDelete bool Fields Fields Wheres Wheres Relations Relations Mappings map[string]any Parent *Relation UniqueKey string ForeignKey ForeignKey UniqueName string UsingView bool ViewName string ViewCreated bool }
func (*Relation) GetAllRelations ¶
func (*Relation) GetFullName ¶
func (*Relation) GetMapping ¶
type RelationUpdateEvent ¶
type RelationsUpdate ¶
type RelationsUpdate map[*Relation][]*RelationUpdateEvent
type ScriptedField ¶
type SimpleField ¶
type UpdateEvent ¶
type WaitingEvents ¶
type WaitingEvents struct { Insert utils.ConcurrentSlice[*InsertEvent] Update utils.ConcurrentSlice[*UpdateEvent] Delete utils.ConcurrentSlice[*DeleteEvent] RelationsUpdate utils.ConcurrentSlice[*RelationUpdateEvent] }
Click to show internal directories.
Click to hide internal directories.