Documentation ¶
Index ¶
- Constants
- Variables
- func GetCacheDirPath() string
- func GetDataDirPath() string
- func GetMaxRetries() int
- func GetReportsDirPath() string
- func IsHTTPTransport() bool
- func SetDataDirPath(path string)
- func SetOutputEventProcessor(eventProcessor OutputEventProcessor)
- func ShouldIgnoreEvent(uriRaw string) bool
- type Backoff
- type Client
- func (client *Client) Close() error
- func (client *Client) Connect() error
- func (client *Client) Publish(ctx context.Context, batch publisher.Batch) error
- func (client *Client) SetLogger(logger log.FieldLogger)
- func (client *Client) SetTransportClient(outputClient outputs.Client)
- func (client *Client) String() string
- type Config
- type Connection
- type HTTPClient
- type HTTPClientSettings
- type HostConfig
- type OutputEventProcessor
- type ProxyConfig
Constants ¶
const ( // TransactionFlow - the transaction flow used for events TransactionFlow = "api-central-v8" // FlowHeader - the header key for the flow value FlowHeader = "axway-target-flow" )
const (
HealthCheckEndpoint = traceabilityStr
)
Variables ¶
var ( ErrHTTPNotConnected = errors.New(1503, "http transport is not connected") ErrJSONEncodeFailed = errors.New(1504, "failed to encode the json content") ErrInvalidConfig = errors.Newf(1505, "invalid traceability config. Config error: %s") ErrInvalidRegex = errors.Newf(1506, "could not compile the %s regex value (%v): %v") )
Config errors
var GetClient = getClient
GetClient - returns a random client from the clients array
Functions ¶
func GetCacheDirPath ¶
func GetCacheDirPath() string
GetCacheDirPath - Returns the path of the cache directory
func GetDataDirPath ¶
func GetDataDirPath() string
GetDataDirPath - Returns the path of the data directory
func GetMaxRetries ¶
func GetMaxRetries() int
GetMaxRetries - Returns the max retries configured for transport
func GetReportsDirPath ¶
func GetReportsDirPath() string
GetReportsDirPath - Returns the path of the reports directory
func IsHTTPTransport ¶
func IsHTTPTransport() bool
IsHTTPTransport - Returns true if the protocol is set to http/https
func SetDataDirPath ¶
func SetDataDirPath(path string)
SetDataDirPath - Sets the path of the data directory
func SetOutputEventProcessor ¶
func SetOutputEventProcessor(eventProcessor OutputEventProcessor)
SetOutputEventProcessor -
func ShouldIgnoreEvent ¶
ShouldIgnoreEvent - check to see if the uri exists in exception list
Types ¶
type Client ¶
Client - struct
func (*Client) SetLogger ¶
func (client *Client) SetLogger(logger log.FieldLogger)
SetLogger - set the logger
func (*Client) SetTransportClient ¶
SetTransportClient - set the transport client
type Config ¶
type Config struct { Index string `config:"index"` LoadBalance bool `config:"loadbalance"` BulkMaxSize int `config:"bulk_max_size"` SlowStart bool `config:"slow_start"` Timeout time.Duration `config:"client_timeout" validate:"min=0"` TTL time.Duration `config:"ttl" validate:"min=0"` Pipelining int `config:"pipelining" validate:"min=0"` CompressionLevel int `config:"compression_level" validate:"min=0, max=9"` MaxRetries int `config:"max_retries" validate:"min=-1"` TLS *tlscommon.Config `config:"ssl"` Proxy ProxyConfig `config:",inline"` Backoff Backoff `config:"backoff"` EscapeHTML bool `config:"escape_html"` Protocol string `config:"protocol"` Hosts []string `config:"hosts"` Redaction redaction.Config `config:"redaction" yaml:"redaction"` Sampling sampling.Sampling `config:"sampling" yaml:"sampling"` APIExceptionsList []string `config:"apiExceptionsList"` }
Config -
type Connection ¶
Connection struct
type HTTPClient ¶
type HTTPClient struct { Connection // contains filtered or unexported fields }
HTTPClient struct
func NewHTTPClient ¶
func NewHTTPClient(s HTTPClientSettings) (*HTTPClient, error)
NewHTTPClient instantiate a client.
func (*HTTPClient) Close ¶
func (client *HTTPClient) Close() error
Close publish a single event to output.
func (*HTTPClient) Connect ¶
func (client *HTTPClient) Connect() error
Connect establishes a connection to the clients sink.
func (*HTTPClient) String ¶
func (client *HTTPClient) String() string
type HTTPClientSettings ¶
type HTTPClientSettings struct { BeatInfo beat.Info URL string Proxy *url.URL TLS *transport.TLSConfig Index outil.Selector Pipeline *outil.Selector Timeout time.Duration CompressionLevel int Observer outputs.Observer Headers map[string]string UserAgent string }
HTTPClientSettings struct
type HostConfig ¶ added in v1.1.86
Config -
type OutputEventProcessor ¶
OutputEventProcessor - P
type ProxyConfig ¶
type ProxyConfig struct { // URL of the SOCKS proxy. Scheme must be socks5. Username and password can be // embedded in the URL. URL string `config:"proxy_url"` // Resolve names locally instead of on the SOCKS server. LocalResolve bool `config:"proxy_use_local_resolver"` }
ProxyConfig holds the configuration information required to proxy connections through a SOCKS5 proxy server.