Documentation
¶
Index ¶
Constants ¶
View Source
const ( ScriptKeyDataIn = "dataIn" // post data to script ScriptKeyDataOut = "dataOut" // get data from script ScriptKeyConfigIn = "configIn" // post config data to script ScriptKeyPreRunResponse = "preRunResponse" // post pre run response to script ScriptKeyPostRunResponse = "postRunResponse" // post post-run response to script ScriptKeyExecute = "execute" // get execute binary signal from script DefaultNode = "default" // default node endpoint name, if none matches BodyLanguageJSON = "json" BodyLanguageYAML = "yaml" BodyLanguagePlainText = "plaintext" PreRun = "pre_run" PostRun = "post_run" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpConfig ¶
type HttpConfig struct {
HttpNode
Disabled bool `json:"disabled" yaml:"disabled"`
ExecutionInterval string `json:"executionInterval" yaml:"executionInterval"`
}
http config
type HttpNode ¶
type HttpNode struct {
HttpNodeConfig
Insecure bool `json:"insecure" yaml:"insecure"`
PreRun map[string]HttpNodeConfig `json:"preRun" yaml:"preRun"`
PostRun map[string]HttpNodeConfig `json:"postRun" yaml:"postRun"`
}
http node
type HttpNodeConfig ¶
type HttpNodeConfig struct {
URL string `json:"url" yaml:"url"`
Method string `json:"method" yaml:"method"`
Headers map[string]string `json:"headers" yaml:"headers"`
QueryParameters map[string]interface{} `json:"queryParameters" yaml:"queryParameters"`
BodyLanguage string `json:"bodyLanguage" yaml:"bodyLanguage"`
Body interface{} `json:"body" yaml:"body"`
ResponseCode int `json:"responseCode" yaml:"responseCode"`
IncludeGlobalConfig bool `json:"includeGlobalConfig" yaml:"includeGlobalConfig"`
Script string `json:"script" yaml:"script"`
}
Http node config
func (*HttpNodeConfig) Clone ¶
func (hn *HttpNodeConfig) Clone() *HttpNodeConfig
Clone cones HttpNodeConfig
type HttpProtocol ¶
type HttpProtocol struct {
GatewayConfig *gwTY.Config
Config *HttpProtocolConf
// contains filtered or unexported fields
}
http protocol
func New ¶
func New(logger *zap.Logger, gwCfg *gwTY.Config, protocol cmap.CustomMap, rxMsgFunc func(rm *msgTY.RawMessage) error, scheduler schedulerTY.CoreScheduler) (*HttpProtocol, error)
New returns new instance of generic http protocol
func (*HttpProtocol) Close ¶
func (hp *HttpProtocol) Close() error
Close closes the generic http protocol
type HttpProtocolConf ¶
type HttpProtocolConf struct {
Type string `json:"type" yaml:"type"`
Headers map[string]string `json:"headers" yaml:"headers"`
QueryParameters map[string]interface{} `json:"queryParameters" yaml:"queryParameters"`
Endpoints map[string]HttpConfig `json:"endpoints" yaml:"endpoints"`
Nodes map[string]HttpNode `json:"nodes" yaml:"nodes"`
}
http protocol config
Click to show internal directories.
Click to hide internal directories.