http

package
v1.16.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Headers           map[string]string `json:"headers" yaml:"headers"`
	BasicAuthUser     string            `json:"basic_auth_user" yaml:"basic_auth_user"`
	BasicAuthPassword string            `json:"basic_auth_password" yaml:"basic_auth_password"`
}

type Config

type Config struct {
	Source      string `json:"source" yaml:"source"`
	TargetField string `json:"target_field" yaml:"target_field"`
	StreamName  string `json:"stream_name" yaml:"stream_name"`
	Endpoint    string `json:"endpoint" yaml:"endpoint"`
	Method      string `json:"method" yaml:"method"`
	Auth        Auth   `json:"auth" yaml:"auth"`
}

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func NewHttpPlugin

func NewHttpPlugin(appctx *stream_context.Context, config Config) (*Plugin, error)

func (*Plugin) EvolveSchema

func (p *Plugin) EvolveSchema(streamSchema *schema.StreamSchemaObj) error

EvolveSchema will add a string column to the schema in order to store OpenAI response

func (*Plugin) Process

func (p *Plugin) Process(context context.Context, msg *message.Message) (*message.Message, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL