Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultContentType = "application/json; charset=utf-8" ContentTypeHeaderKey = "Content-Type" AuthorizationHeaderKey = "Authorization" UserAgentHeaderKey = "User-Agent" UserAgentHeaderValue = "Narrows" MutualTLSFilesPath = "/tmp/NarrowsTlsFiles" MutualTLSClientCertFilename = "/client.crt" MutualTLSClientKeyFilename = "/client.key" MutualTLSCaCertFilename = "/ca.crt" )
Variables ¶
View Source
var ErrClientCreation = errors.New("client creation error")
ErrClientCreation is returned if client can't be created
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { EndpointURL *url.URL MutualTLSEnabled bool CheckCert bool HeaderList []Header ContentType string Config *v1alpha1.ExportConfig }
Client communicates with the different API.
func NewClient ¶
func NewClient(defaultEndpointURL string, mutualTLSEnabled bool, checkCert bool, config *v1alpha1.ExportConfig) (*Client, error)
NewClient returns a new output.Client
func (*Client) BasicAuth ¶
BasicAuth adds an HTTP Basic Authentication compliant header to the Client.
func (*Client) OpenSearchPost ¶
OpenSearchPost posts event to OpenSearch
type Governor ¶
type Governor struct { Payload string Config v1alpha1.ExportConfig }
func IntializeGovernor ¶
func IntializeGovernor(payload string, config v1alpha1.ExportConfig) Governor
Click to show internal directories.
Click to hide internal directories.