Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶ added in v1.27.0
type Checker struct {
// contains filtered or unexported fields
}
Checker holds a map that maps event pairs to a dummy struct. It is basically used as a set to check for existence.
func NewChecker ¶ added in v1.27.0
NewChecker is the constructor for a Checker.
type Constraint ¶
type Constraint struct { Id string `json:"id"` SegmentKey string `json:"segment_key"` Type string `json:"type"` Property string `json:"property"` Operator string `json:"operator"` Value string `json:"value"` NamespaceKey string `json:"namespace_key"` }
func NewConstraint ¶
func NewConstraint(c *flipt.Constraint) *Constraint
type Distribution ¶
type Distribution struct { Id string `json:"id"` RuleId string `json:"rule_id"` VariantId string `json:"variant_id"` Rollout float32 `json:"rollout"` }
func NewDistribution ¶
func NewDistribution(d *flipt.Distribution) *Distribution
type Event ¶
type Event struct { Version string `json:"version" avro:"version"` Type string `json:"type" avro:"type"` Action string `json:"action" avro:"action"` Metadata Metadata `json:"metadata" avro:"metadata"` Payload interface{} `json:"payload" avro:"payload"` Timestamp string `json:"timestamp" avro:"timestamp"` Status string `json:"status" avro:"status"` }
Event holds information that represents an action that was attempted in the system.
func (Event) DecodeToAttributes ¶
DecodeToAttributes provides a helper method for an Event that will return a value compatible to a SpanEvent.
func (Event) MarshalLogObject ¶ added in v1.44.0
func (e Event) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*Event) PayloadToMap ¶ added in v1.46.0
type EventExporter ¶
type EventExporter interface { ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error Shutdown(ctx context.Context) error SendAudits(ctx context.Context, es []Event) error }
EventExporter provides an API for exporting spans as Event(s).
func NewSinkSpanExporter ¶
func NewSinkSpanExporter(logger *zap.Logger, sinks []Sink) EventExporter
NewSinkSpanExporter is the constructor for a SinkSpanExporter.
type EventPairChecker ¶ added in v1.44.0
EventPairChecker is the contract for checking if an event pair exists and if it should be emitted to configured sinks.
type Flag ¶
type Metadata ¶
type Metadata struct {
Actor *Actor `json:"actor,omitempty" avro:"actor"`
}
Metadata holds information of what metadata an event will contain.
type Namespace ¶
type Namespace struct { Key string `json:"key"` Name string `json:"name"` Description string `json:"description"` Protected bool `json:"protected"` }
func NewNamespace ¶
type NoOpChecker ¶ added in v1.44.0
type NoOpChecker struct{}
func (*NoOpChecker) Check ¶ added in v1.44.0
func (n *NoOpChecker) Check(eventPair string) bool
func (*NoOpChecker) Events ¶ added in v1.44.0
func (n *NoOpChecker) Events() []string
type Rollout ¶ added in v1.24.0
type Rollout struct { NamespaceKey string `json:"namespace_key"` FlagKey string `json:"flag_key"` Rank int32 `json:"rank"` Description string `json:"description"` Threshold *RolloutThreshold `json:"threshold,omitempty"` Segment *RolloutSegment `json:"segment,omitempty"` }
func NewRollout ¶ added in v1.24.0
type RolloutSegment ¶ added in v1.24.0
type RolloutThreshold ¶ added in v1.24.0
type Rule ¶
type Segment ¶
type Segment struct { Key string `json:"key"` Name string `json:"name"` Description string `json:"description"` Constraints []*Constraint `json:"constraints"` MatchType string `json:"match_type"` NamespaceKey string `json:"namespace_key"` }
func NewSegment ¶
type SinkSpanExporter ¶
type SinkSpanExporter struct {
// contains filtered or unexported fields
}
SinkSpanExporter sends audit logs to configured sinks through intercepting span events.
func (*SinkSpanExporter) ExportSpans ¶
func (s *SinkSpanExporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error
ExportSpans completes one part of the implementation of a SpanExporter. Decodes span events to audit events.
func (*SinkSpanExporter) SendAudits ¶
func (s *SinkSpanExporter) SendAudits(ctx context.Context, es []Event) error
SendAudits wraps the methods of sending audits events to various sinks.