feedback

package
Version: v0.0.0-...-db3a1d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CfgFluentdHost        = "fluentd.host"
	CfgFluentdPort        = "fluentd.port"
	CfgProhibitedHeaders  = "prohibited_headers"
	CfgRequestResponseTag = "tags.request_response"
	CfgResponseBodyTag    = "tags.response_body"
	CfgFeedbackTag        = "tags.feedback"
)
View Source
const (
	ModelNameHeaderKey       = "model-name"
	ModelVersionHeaderKey    = "model-version"
	ModelEndpointHeaderKey   = "model-endpoint"
	RequestIdHeaderKey       = "x-request-id"
	LegionRequestIdHeaderKey = "request-id"
	HttpMethodHeaderKey      = ":method"
	OriginalUriHeaderKey     = "x-original-uri"
	StatusHeaderKey          = ":status"
	ForwardedHostHeaderKey   = "x-forwarded-host"
)

Variables

View Source
var (
	CfgFile string
)

Functions

func InitBasicParams

func InitBasicParams(cmd *cobra.Command)

func PanicIfError

func PanicIfError(err error)

Types

type DataLogging

type DataLogging interface {
	Post(tag string, message interface{}) error
	Close() error
}

func NewDataLogger

func NewDataLogger() (DataLogging, error)

type ModelFeedback

type ModelFeedback struct {
	RequestID    string                 `msg:"request_id"`
	ModelVersion string                 `msg:"model_version"`
	ModelName    string                 `msg:"model_name"`
	Payload      map[string]interface{} `msg:"payload"`
}

type RequestResponse

type RequestResponse struct {
	RequestID           string            `msg:"request_id"`
	RequestHttpHeaders  map[string]string `msg:"request_http_headers"`
	RequestContent      string            `msg:"request_content"`
	RequestUri          string            `msg:"request_uri"`
	ResponseStatus      string            `msg:"response_status"`
	ResponseHttpHeaders map[string]string `msg:"response_http_headers"`
	RequestHost         string            `msg:"request_host"`
	ModelEndpoint       string            `msg:"model_endpoint"`
	ModelVersion        string            `msg:"model_version"`
	ModelName           string            `msg:"model_name"`
	RequestHttpMethod   string            `msg:"request_http_method"`
}

type ResponseBody

type ResponseBody struct {
	RequestID       string `msg:"request_id"`
	ModelEndpoint   string `msg:"model_endpoint"`
	ModelVersion    string `msg:"model_version"`
	ModelName       string `msg:"model_name"`
	ResponseContent string `msg:"response_content"`
}

Jump to

Keyboard shortcuts

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