Documentation ¶
Index ¶
- type GroupStrategy
- type HttpRequest
- type Ingester
- func (i *Ingester) Publish(entity *core.Entity)
- func (i *Ingester) PublishExposure(exposure *core.Exposure, isNewFlag bool)
- func (i *Ingester) SetConfig(v *core.SDKConfig)
- func (i *Ingester) SetEntity(entity *core.Entity)
- func (i *Ingester) SetURL(ingestionURL string)
- func (i *Ingester) Shutdown(timeout time.Duration) bool
- func (i *Ingester) Track(event *core.Event)
- type IngestionDataRequest
- type QueueElement
- type RetryPolicy
- type RetryPolicyCallback
- type RetryPolicyRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupStrategy ¶
type GroupStrategy struct {
// contains filtered or unexported fields
}
func NewGroupStrategy ¶
func NewGroupStrategy(sdkInfo *core.SDKInfo, httpRequest HttpRequest) *GroupStrategy
func (*GroupStrategy) Publish ¶
func (gs *GroupStrategy) Publish(data *IngestionDataRequest)
func (*GroupStrategy) SetConfig ¶
func (gs *GroupStrategy) SetConfig(sdkConfig *core.SDKConfig)
func (*GroupStrategy) SetURL ¶
func (gs *GroupStrategy) SetURL(ingestionURL string)
func (*GroupStrategy) ShutdownWithTimeout ¶
func (gs *GroupStrategy) ShutdownWithTimeout(timeout time.Duration) bool
Important notes, this function - waits for group strategy to be initialized(URL and sdkConfig are set) - waits for current ingestion to finish - waits for the ingestionDataChannel to read all the data - adds all the data in the accumulator, ingest it and waits for the httpRequest to finish returns false if shutdown terminates before the timeout
type HttpRequest ¶
type Ingester ¶
type Ingester struct {
// contains filtered or unexported fields
}
func (*Ingester) PublishExposure ¶
PublishExposure
type IngestionDataRequest ¶
type IngestionDataRequest struct { Id string `json:"id"` Entities []*core.Entity `json:"entities"` Exposures []*core.Exposure `json:"exposures"` // the output of every single API call Events []*core.Event `json:"events"` // user generated event SDKInfo *core.SDKInfo `json:"sdkInfo"` // Dictionary holding info about the Flagger version that's sending data back DetectedFlags []string `json:"detectedFlags"` }
type QueueElement ¶
type QueueElement struct {
// contains filtered or unexported fields
}
type RetryPolicy ¶
type RetryPolicy struct {
// contains filtered or unexported fields
}
func NewRetryPolicy ¶
func NewRetryPolicy() *RetryPolicy
func (*RetryPolicy) SetMaxSize ¶
func (rt *RetryPolicy) SetMaxSize(maxMemorySizeInBytes int64)
not thread safe
type RetryPolicyCallback ¶
type RetryPolicyCallback func(err error)
This callback is called when retry policy finishes the processing of the ingestion data httpRequest There are 2 possible scenarios: 1) ingestion is successfully sent to the server 2) new ingestion arrive, so the current ingestion is shift from the queue(not enough memory)
type RetryPolicyRequest ¶
type RetryPolicyRequest struct {
// contains filtered or unexported fields
}