Documentation ¶
Index ¶
Constants ¶
View Source
const ( DeliveryAttemptStatusOK = "ok" DeliveryAttemptStatusFailed = "failed" )
View Source
const (
SinkTypeHttp = "http"
)
View Source
const (
SourceTypeHttp = "http"
)
Variables ¶
View Source
var SinkTypes = []SinkType{ SinkTypeHttp, }
View Source
var SourceTypes = []SourceType{ SourceTypeHttp, }
Functions ¶
func ValidateInhooksConfig ¶
func ValidateInhooksConfig(appConf *lib.AppConfig, c *InhooksConfig) error
ValidateInhooksConfig validates inhooks config and sets defaults
Types ¶
type DeliveryAttempt ¶
type DeliveryAttempt struct { At time.Time `json:"at"` Status DeliveryAttemptStatus `json:"status"` Error string `json:"error"` }
type DeliveryAttemptStatus ¶
type DeliveryAttemptStatus string
type InhooksConfig ¶
type InhooksConfig struct {
Flows []*Flow `yaml:"flows"`
}
type Message ¶
type Message struct { ID string `json:"id"` FlowID string `json:"flowID"` SourceID string `json:"sourceID"` // Ingested Request ID IngestedReqID string `json:"ingestedReqID"` SinkID string `json:"sinkID"` HttpHeaders http.Header `json:"httpHeaders"` RawQuery string `json:"rawQuery"` Payload []byte `json:"payload"` // Processing Info DeliveryAttempts []*DeliveryAttempt `json:"deliveryAttempts"` DeliverAfter time.Time }
type MessageStatus ¶
type MessageStatus string
type QueueStatus ¶
type QueueStatus string
const ( QueueStatusScheduled QueueStatus = "scheduled" QueueStatusReady QueueStatus = "ready" QueueStatusProcessing QueueStatus = "processing" QueueStatusDone QueueStatus = "done" QueueStatusDead QueueStatus = "dead" )
type QueuedInfo ¶ added in v0.1.2
type QueuedInfo struct { MessageID string QueueStatus QueueStatus DeliverAfter time.Time }
type Sink ¶
type Sink struct { // Sink ID ID string `yaml:"id"` // Sink Type Type SinkType `yaml:"type"` // Sink Url for HTTP sinks URL string `yaml:"url"` // Process after delay Delay *time.Duration `yaml:"delay"` // Retry every x time RetryInterval *time.Duration `yaml:"retryInterval"` // Retry exponential multiplier. 1 is constant backoff. Set to > 1 for exponential backoff. RetryExpMultiplier *float64 `yaml:"retryExpMultiplier"` // Max attempts MaxAttempts *int `yaml:"maxAttempts"` }
type Source ¶
type Source struct { ID string `yaml:"id"` Slug string `yaml:"slug"` Type SourceType `yaml:"type"` }
type SourceType ¶
type SourceType string
Click to show internal directories.
Click to hide internal directories.