common

package module
v0.0.0-...-aab968f Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAwsConfig

func GetAwsConfig() (*aws.Config, error)

GetAwsConfig get's the configuration required to connect to aws

func HandleHTTPRequest

func HandleHTTPRequest(message string, headers http.Header, data ConnectorMetadata, logger *zap.Logger) (*http.Response, error)

HandleHTTPRequest sends message and headers data to HTTP endpoint using POST method and returns response on success or error in case of failure

Types

type ConnectorMetadata

type ConnectorMetadata struct {
	Topic         string
	ResponseTopic string
	ErrorTopic    string
	HTTPEndpoint  string
	MaxRetries    int
	ContentType   string
	SourceName    string
}

ConnectorMetadata contains common fields used by connectors

func ParseConnectorMetadata

func ParseConnectorMetadata() (ConnectorMetadata, error)

ParseConnectorMetadata parses connector side common fields and returns as ConnectorMetadata or returns error

Jump to

Keyboard shortcuts

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