Documentation
¶
Index ¶
- func GetSyncIdFromAnnotations(annos Annotations) (string, error)
- type Annotations
- func (a *Annotations) Append(msgs ...proto.Message)
- func (a *Annotations) Contains(msg proto.Message) bool
- func (a *Annotations) ContainsAny(msgs ...proto.Message) bool
- func (a *Annotations) Merge(newAnnotations ...*anypb.Any)
- func (a *Annotations) Pick(needle proto.Message) (bool, error)
- func (a *Annotations) Update(msg proto.Message)
- func (a *Annotations) WithRateLimitWaitReport(waitMs int64) *Annotations
- func (a *Annotations) WithRateLimiting(rateLimit *v2.RateLimitDescription) *Annotations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSyncIdFromAnnotations ¶ added in v0.2.82
func GetSyncIdFromAnnotations(annos Annotations) (string, error)
NOTE: the store is the only usage of this.
Types ¶
type Annotations ¶
func New ¶ added in v0.1.11
func New(msgs ...proto.Message) Annotations
New - Convenience function to create annotations.
func (*Annotations) Append ¶
func (a *Annotations) Append(msgs ...proto.Message)
Append appends the proto message to the annotations slice.
func (*Annotations) Contains ¶
func (a *Annotations) Contains(msg proto.Message) bool
Contains checks if the message is in the annotations slice.
func (*Annotations) ContainsAny ¶ added in v0.2.93
func (a *Annotations) ContainsAny(msgs ...proto.Message) bool
func (*Annotations) Merge ¶ added in v0.1.39
func (a *Annotations) Merge(newAnnotations ...*anypb.Any)
func (*Annotations) Pick ¶
func (a *Annotations) Pick(needle proto.Message) (bool, error)
Pick checks if the message is in the annotations slice.
func (*Annotations) Update ¶
func (a *Annotations) Update(msg proto.Message)
Update updates the annotations slice.
func (*Annotations) WithRateLimitWaitReport ¶ added in v0.20.1
func (a *Annotations) WithRateLimitWaitReport(waitMs int64) *Annotations
WithRateLimitWaitReport reports time this connector spent sleeping on rate limits internally while serving the request — e.g. its API client's own client-side throttling or HTTP 429 backoff. Those sleeps happen inside the connector process, invisible to the syncer (which may be across a gRPC or lambda boundary); this annotation is how they reach the rate_limit_wait sync stat. Waits in the syncer process report via ratelimit.ObserveWait instead and must not be double-reported here. No-op if waitMs <= 0.
func (*Annotations) WithRateLimiting ¶
func (a *Annotations) WithRateLimiting(rateLimit *v2.RateLimitDescription) *Annotations
WithRateLimiting takes a pointer to a RateLimitDescription and appends it to the Annotations slice.