Documentation ¶
Overview ¶
Package rest provides the REST rule data ingest engine
Index ¶
Constants ¶
View Source
const ( // RestRuleDataIngestType is the type of the REST rule data ingest engine RestRuleDataIngestType = "rest" // MaxBytesLimit is the maximum number of bytes to read from the response body // We limit to 1MB to prevent abuse MaxBytesLimit int64 = 1 << 20 // EndpointBytesLimit is the maximum number of bytes for the endpoint EndpointBytesLimit = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointTemplateParams ¶
type EndpointTemplateParams struct { // Entity is the entity to be evaluated Entity any // Params are the parameters to be used in the template Params map[string]any }
EndpointTemplateParams is the parameters for the REST endpoint template
type Ingestor ¶
type Ingestor struct {
// contains filtered or unexported fields
}
Ingestor is the engine for a rule type that uses REST data ingest
func NewRestRuleDataIngest ¶
NewRestRuleDataIngest creates a new REST rule data ingest engine
func (*Ingestor) GetConfig ¶
func (rdi *Ingestor) GetConfig() protoreflect.ProtoMessage
GetConfig returns the config for the REST rule data ingest engine
func (*Ingestor) Ingest ¶
func (rdi *Ingestor) Ingest( ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any, ) (*interfaces.Result, error)
Ingest calls the REST endpoint and returns the data
Click to show internal directories.
Click to hide internal directories.