Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct { policies.UnimplementedGenerator // contains filtered or unexported fields }
Generator generates nginx configuration based on an observability policy.
func NewGenerator ¶
NewGenerator returns a new instance of Generator.
func (Generator) GenerateForInternalLocation ¶
func (g Generator) GenerateForInternalLocation(pols []policies.Policy) policies.GenerateResultFiles
GenerateForInternalLocation generates policy configuration for an internal location block. otel_span_attr and otel_span_name are set in the internal location, with otel_trace and otel_trace_context being specified in the external location that redirects to the internal location.
func (Generator) GenerateForLocation ¶
func (g Generator) GenerateForLocation(pols []policies.Policy, location http.Location) policies.GenerateResultFiles
GenerateForLocation generates policy configuration for a normal location block. For a normal location, all directives are applied. When the configuration involves a normal location redirecting to an internal location, only otel_trace and otel_trace_context are applied to the normal location.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator validates an ObservabilityPolicy. Implements policies.Validator interface.
func NewValidator ¶
func NewValidator(genericValidator validation.GenericValidator) *Validator
NewValidator returns a new instance of Validator.
func (*Validator) Validate ¶
func (v *Validator) Validate( policy policies.Policy, globalSettings *policies.GlobalSettings, ) []conditions.Condition
Validate validates the spec of an ObservabilityPolicy.