Documentation ¶
Index ¶
- Constants
- Variables
- func FindSequenceNumber(sequence string) (int, error)
- func IsTestMode(ctx context.Context) bool
- func ParseEndpointArgs(endpoint_strings []string, yaml_config_properties []string, ...) (viper_endpoints *viper.Viper, err error)
- func ParseTransactionResult(transactionResult string) (string, int)
- func ValidateEndpoint(endpoint string, apiInterface string) error
- type AuthConfig
- type NodeUrl
- type RPCConsumerLogs
- func (pl *RPCConsumerLogs) AddMetricForGrpc(data *metrics.RelayMetrics, err error, metadataValues *metadata.MD)
- func (pl *RPCConsumerLogs) AddMetricForHttp(data *metrics.RelayMetrics, err error, headers map[string]string)
- func (pl *RPCConsumerLogs) AddMetricForWebSocket(data *metrics.RelayMetrics, err error, c *websocket.Conn)
- func (pl *RPCConsumerLogs) AnalyzeWebSocketErrorAndWriteMessage(c *websocket.Conn, mt int, err error, msgSeed string, msg []byte, ...)
- func (pl *RPCConsumerLogs) GetMessageSeed() string
- func (pl *RPCConsumerLogs) GetUniqueGuidResponseForError(responseError error, msgSeed string) string
- func (pl *RPCConsumerLogs) LogRequestAndResponse(module string, hasError bool, method string, path string, req string, ...)
- func (pl *RPCConsumerLogs) LogStartTransaction(name string) func()
- func (rpccl *RPCConsumerLogs) LogTestMode(fiberCtx *fiber.Ctx)
- type Test_mode_ctx_key
Constants ¶
View Source
const ( EndpointsConfigName = "endpoints" SaveConfigFlagName = "save-conf" GeolocationFlag = "geolocation" TestModeFlagName = "test-mode" )
View Source
const ( URL_QUERY_PARAMETERS_SEPARATOR_FROM_PATH = "?" URL_QUERY_PARAMETERS_SEPARATOR_OTHER_PARAMETERS = "&" IP_FORWARDING_HEADER_NAME = "X-Forwarded-For" )
View Source
const (
RefererHeaderKey = "Referer"
)
Variables ¶
View Source
var ReturnMaskedErrors = "false"
Functions ¶
func FindSequenceNumber ¶
extract requested sequence number from tx error.
func IsTestMode ¶
func ParseEndpointArgs ¶
func ParseTransactionResult ¶
func ValidateEndpoint ¶
Types ¶
type AuthConfig ¶
type AuthConfig struct { AuthHeaders map[string]string `yaml:"auth-headers,omitempty" json:"auth-headers,omitempty" mapstructure:"auth-headers"` AuthQuery string `yaml:"auth-query,omitempty" json:"auth-query,omitempty" mapstructure:"auth-query"` }
func (*AuthConfig) AddAuthPath ¶
func (ac *AuthConfig) AddAuthPath(url string) string
type NodeUrl ¶
type NodeUrl struct { Url string `yaml:"url,omitempty" json:"url,omitempty" mapstructure:"url"` AuthConfig AuthConfig `yaml:"auth-config,omitempty" json:"auth-config,omitempty" mapstructure:"auth-config"` IpForwarding bool `yaml:"ip-forwarding,omitempty" json:"ip-forwarding,omitempty" mapstructure:"ip-forwarding"` }
func (*NodeUrl) SetAuthHeaders ¶
func (*NodeUrl) SetIpForwardingIfNecessary ¶
type RPCConsumerLogs ¶ added in v0.5.0
type RPCConsumerLogs struct { MetricService *metrics.MetricService StoreMetricData bool // contains filtered or unexported fields }
func NewRPCConsumerLogs ¶ added in v0.5.0
func NewRPCConsumerLogs() (*RPCConsumerLogs, error)
func (*RPCConsumerLogs) AddMetricForGrpc ¶ added in v0.6.0
func (pl *RPCConsumerLogs) AddMetricForGrpc(data *metrics.RelayMetrics, err error, metadataValues *metadata.MD)
func (*RPCConsumerLogs) AddMetricForHttp ¶ added in v0.6.0
func (pl *RPCConsumerLogs) AddMetricForHttp(data *metrics.RelayMetrics, err error, headers map[string]string)
func (*RPCConsumerLogs) AddMetricForWebSocket ¶ added in v0.6.0
func (pl *RPCConsumerLogs) AddMetricForWebSocket(data *metrics.RelayMetrics, err error, c *websocket.Conn)
func (*RPCConsumerLogs) AnalyzeWebSocketErrorAndWriteMessage ¶ added in v0.5.0
func (pl *RPCConsumerLogs) AnalyzeWebSocketErrorAndWriteMessage(c *websocket.Conn, mt int, err error, msgSeed string, msg []byte, rpcType string)
Websocket healthy disconnections throw "websocket: close 1005 (no status)" error, We dont want to alert error monitoring for that purpses.
func (*RPCConsumerLogs) GetMessageSeed ¶ added in v0.5.0
func (pl *RPCConsumerLogs) GetMessageSeed() string
func (*RPCConsumerLogs) GetUniqueGuidResponseForError ¶ added in v0.5.0
func (pl *RPCConsumerLogs) GetUniqueGuidResponseForError(responseError error, msgSeed string) string
Input will be masked with a random GUID if returnMaskedErrors is set to true
func (*RPCConsumerLogs) LogRequestAndResponse ¶ added in v0.5.0
func (*RPCConsumerLogs) LogStartTransaction ¶ added in v0.5.0
func (pl *RPCConsumerLogs) LogStartTransaction(name string) func()
func (*RPCConsumerLogs) LogTestMode ¶ added in v0.9.0
func (rpccl *RPCConsumerLogs) LogTestMode(fiberCtx *fiber.Ctx)
type Test_mode_ctx_key ¶
type Test_mode_ctx_key struct{}
Click to show internal directories.
Click to hide internal directories.