Documentation ¶
Index ¶
- func NewApiGroupAccess(client group_client.GroupServiceClient) group.GroupAccess
- type QueryWatcher
- type QueryWatcherEvent
- func (e *QueryWatcherEvent) GetChanges() gotenresource.ResourceChangeList
- func (e *QueryWatcherEvent) GetSnapshotSize() int64
- func (e *QueryWatcherEvent) GetWatcherIdentifier() int
- func (e *QueryWatcherEvent) HasSnapshotSize() bool
- func (e *QueryWatcherEvent) IsLostSync() bool
- func (e *QueryWatcherEvent) IsReset() bool
- func (e *QueryWatcherEvent) IsSync() bool
- type QueryWatcherParams
- type Watcher
- func (pw *Watcher) Events() <-chan WatcherEvent
- func (pw *Watcher) GetFilters() []*WatcherFilterParams
- func (pw *Watcher) GetIFilters() []gotenaccess.WatcherFilterParams
- func (pw *Watcher) IEvents() <-chan gotenaccess.WatcherEvent
- func (pw *Watcher) InSync() bool
- func (pw *Watcher) ResetFilters(ctx context.Context, filters ...*WatcherFilterParams) (int32, error)
- func (pw *Watcher) ResetIFilters(ctx context.Context, filters ...gotenaccess.WatcherFilterParams) (int32, error)
- func (pw *Watcher) Run(ctx context.Context) error
- type WatcherConfig
- type WatcherEvent
- func (e *WatcherEvent) AppendChange(change *WatcherEventChange)
- func (e *WatcherEvent) AppendRawChange(change gotenaccess.WatcherEventChange)
- func (e *WatcherEvent) GetAt(index int) *WatcherEventChange
- func (e *WatcherEvent) GetRawAt(index int) gotenaccess.WatcherEventChange
- func (e *WatcherEvent) Length() int
- func (e *WatcherEvent) Merge(src *WatcherEvent)
- type WatcherEventChange
- func (c *WatcherEventChange) GetAdded() *group.Group
- func (c *WatcherEventChange) GetCurrent() *group.Group
- func (c *WatcherEventChange) GetDeleted() *group.Group
- func (c *WatcherEventChange) GetName() *group.Name
- func (c *WatcherEventChange) GetPrevious() *group.Group
- func (c *WatcherEventChange) GetRawAdded() gotenresource.Resource
- func (c *WatcherEventChange) GetRawCurrent() gotenresource.Resource
- func (c *WatcherEventChange) GetRawDeleted() gotenresource.Resource
- func (c *WatcherEventChange) GetRawName() gotenresource.Name
- func (c *WatcherEventChange) GetRawPrevious() gotenresource.Resource
- func (c *WatcherEventChange) IsAdd() bool
- func (c *WatcherEventChange) IsDelete() bool
- func (c *WatcherEventChange) IsModify() bool
- type WatcherFilterParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApiGroupAccess ¶
func NewApiGroupAccess(client group_client.GroupServiceClient) group.GroupAccess
Types ¶
type QueryWatcher ¶
type QueryWatcher struct {
// contains filtered or unexported fields
}
QueryWatcher is a low-level, stateless watcher. Initial updates are sent in chunks. Once snapshot is complete, further changes are incremental - unless Reset flag is set, in which case another snapshot is received.
func NewQueryWatcher ¶
func NewQueryWatcher(id int, client group_client.GroupServiceClient, params *QueryWatcherParams, evtsChan chan *QueryWatcherEvent) *QueryWatcher
func NewQueryWatcherWithIChan ¶ added in v0.9.0
func NewQueryWatcherWithIChan(id int, client group_client.GroupServiceClient, params *QueryWatcherParams, evtsChan chan gotenaccess.QueryWatcherEvent) *QueryWatcher
func (*QueryWatcher) QueryWatcher ¶ added in v0.9.0
func (qw *QueryWatcher) QueryWatcher()
type QueryWatcherEvent ¶
type QueryWatcherEvent struct { Identifier int Changes []*group.GroupChange Reset bool LostSync bool InSync bool SnapshotSize int64 CheckSize bool }
func (*QueryWatcherEvent) GetChanges ¶ added in v0.9.0
func (e *QueryWatcherEvent) GetChanges() gotenresource.ResourceChangeList
func (*QueryWatcherEvent) GetSnapshotSize ¶ added in v0.9.0
func (e *QueryWatcherEvent) GetSnapshotSize() int64
func (*QueryWatcherEvent) GetWatcherIdentifier ¶ added in v0.9.0
func (e *QueryWatcherEvent) GetWatcherIdentifier() int
func (*QueryWatcherEvent) HasSnapshotSize ¶ added in v0.9.0
func (e *QueryWatcherEvent) HasSnapshotSize() bool
func (*QueryWatcherEvent) IsLostSync ¶ added in v0.9.0
func (e *QueryWatcherEvent) IsLostSync() bool
func (*QueryWatcherEvent) IsReset ¶ added in v0.9.0
func (e *QueryWatcherEvent) IsReset() bool
func (*QueryWatcherEvent) IsSync ¶ added in v0.9.0
func (e *QueryWatcherEvent) IsSync() bool
type QueryWatcherParams ¶
type QueryWatcherParams struct { Parent *group.ParentName Filter *group.Filter View view.View FieldMask *group.Group_FieldMask OrderBy *group.OrderBy Cursor *group.PagerCursor ChunkSize int PageSize int WatchType watch_type.WatchType StartingTime *timestamppb.Timestamp RecoveryDeadline time.Duration RetryTimeout time.Duration }
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is higher level stateful watcher with dynamic + multi filter support.
func NewWatcher ¶
func NewWatcher(client group_client.GroupServiceClient, config *WatcherConfig, filters ...*WatcherFilterParams) *Watcher
func (*Watcher) Events ¶
func (pw *Watcher) Events() <-chan WatcherEvent
func (*Watcher) GetFilters ¶
func (pw *Watcher) GetFilters() []*WatcherFilterParams
func (*Watcher) GetIFilters ¶ added in v0.4.16
func (pw *Watcher) GetIFilters() []gotenaccess.WatcherFilterParams
func (*Watcher) IEvents ¶ added in v0.4.16
func (pw *Watcher) IEvents() <-chan gotenaccess.WatcherEvent
func (*Watcher) ResetFilters ¶
func (*Watcher) ResetIFilters ¶ added in v0.4.16
func (pw *Watcher) ResetIFilters(ctx context.Context, filters ...gotenaccess.WatcherFilterParams) (int32, error)
type WatcherConfig ¶
type WatcherConfig struct { *gotenaccess.WatcherConfigBase // common params that must be shared across queries WatchType watch_type.WatchType View view.View FieldMask *group.Group_FieldMask OrderBy *group.OrderBy ChunkSize int }
type WatcherEvent ¶
type WatcherEvent struct { gotenaccess.WatcherEventBase Changes []*WatcherEventChange }
func (*WatcherEvent) AppendChange ¶
func (e *WatcherEvent) AppendChange(change *WatcherEventChange)
func (*WatcherEvent) AppendRawChange ¶
func (e *WatcherEvent) AppendRawChange(change gotenaccess.WatcherEventChange)
func (*WatcherEvent) GetAt ¶
func (e *WatcherEvent) GetAt(index int) *WatcherEventChange
func (*WatcherEvent) GetRawAt ¶
func (e *WatcherEvent) GetRawAt(index int) gotenaccess.WatcherEventChange
func (*WatcherEvent) Length ¶
func (e *WatcherEvent) Length() int
func (*WatcherEvent) Merge ¶
func (e *WatcherEvent) Merge(src *WatcherEvent)
Merge makes a shallow merge of two events
type WatcherEventChange ¶
type WatcherEventChange struct {
// contains filtered or unexported fields
}
func NewAddWatcherEventChange ¶
func NewAddWatcherEventChange(resource *group.Group) *WatcherEventChange
func NewDeleteWatcherEventChange ¶
func NewDeleteWatcherEventChange(deleted *group.Group) *WatcherEventChange
func NewModifyWatcherEventChange ¶
func NewModifyWatcherEventChange(current, previous *group.Group) *WatcherEventChange
func (*WatcherEventChange) GetAdded ¶
func (c *WatcherEventChange) GetAdded() *group.Group
func (*WatcherEventChange) GetCurrent ¶
func (c *WatcherEventChange) GetCurrent() *group.Group
func (*WatcherEventChange) GetDeleted ¶
func (c *WatcherEventChange) GetDeleted() *group.Group
func (*WatcherEventChange) GetName ¶
func (c *WatcherEventChange) GetName() *group.Name
func (*WatcherEventChange) GetPrevious ¶
func (c *WatcherEventChange) GetPrevious() *group.Group
func (*WatcherEventChange) GetRawAdded ¶
func (c *WatcherEventChange) GetRawAdded() gotenresource.Resource
func (*WatcherEventChange) GetRawCurrent ¶
func (c *WatcherEventChange) GetRawCurrent() gotenresource.Resource
func (*WatcherEventChange) GetRawDeleted ¶
func (c *WatcherEventChange) GetRawDeleted() gotenresource.Resource
func (*WatcherEventChange) GetRawName ¶
func (c *WatcherEventChange) GetRawName() gotenresource.Name
func (*WatcherEventChange) GetRawPrevious ¶
func (c *WatcherEventChange) GetRawPrevious() gotenresource.Resource
func (*WatcherEventChange) IsAdd ¶
func (c *WatcherEventChange) IsAdd() bool
func (*WatcherEventChange) IsDelete ¶
func (c *WatcherEventChange) IsDelete() bool
func (*WatcherEventChange) IsModify ¶
func (c *WatcherEventChange) IsModify() bool
type WatcherFilterParams ¶
type WatcherFilterParams struct { Parent *group.ParentName Filter *group.Filter }
func (*WatcherFilterParams) GetIFilter ¶ added in v0.4.16
func (p *WatcherFilterParams) GetIFilter() gotenresource.Filter
func (*WatcherFilterParams) GetIParentName ¶ added in v1.0.21
func (p *WatcherFilterParams) GetIParentName() gotenresource.Name
func (*WatcherFilterParams) String ¶
func (p *WatcherFilterParams) String() string
Click to show internal directories.
Click to hide internal directories.