sources

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: AGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DownloadMaxPartSize = 50 * 1024 * 1024 // the max size of in memory buffers will be 3X as this due to multiple buffers

)

Variables

This section is empty.

Functions

func BuildClassifier added in v1.8.0

BuildClassifier builds a classifier for a source

func ConfirmSubscription

func ConfirmSubscription(notification *SnsNotification) (err error)

ConfirmSubscription will confirm the SNS->SQS subscription

func LoadSource added in v1.8.0

func LoadSource(id string) (*models.SourceIntegration, error)

LoadSource loads the source configuration for an source id. This will update the global cache if needed. It will return error if it encountered an issue retrieving the source information or if the source is not found.

func LoadSourceS3 added in v1.8.0

func LoadSourceS3(bucketName, objectKey string) (*models.SourceIntegration, error)

LoadSourceS3 loads the source configuration for an S3 object. It will update the global cache if needed It will return error if it encountered an issue retrieving the source information or if the source is not found.

func ReadSnsMessage added in v1.13.0

func ReadSnsMessage(ctx context.Context, message string) (result []*common.DataStream, err error)

ReadSnsMessage reads incoming messages containing SNS notifications and returns a slice of DataStream items

Types

type ErrUnsupportedFileType added in v1.5.0

type ErrUnsupportedFileType struct {
	Type string
}

ErrUnsupportedFileType is returned when the log processor encounters a file type that is not supported and cannot process

func (*ErrUnsupportedFileType) Error added in v1.5.0

func (e *ErrUnsupportedFileType) Error() string

type MessageForwarderReader added in v1.6.0

type MessageForwarderReader struct {
	// contains filtered or unexported fields
}

func NewMessageForwarderReader added in v1.6.0

func NewMessageForwarderReader(input io.Reader) *MessageForwarderReader

Reader for messages sent by the Message Forwarder Lambda

func (*MessageForwarderReader) Read added in v1.6.0

func (r *MessageForwarderReader) Read(p []byte) (n int, err error)

type S3ObjectInfo

type S3ObjectInfo struct {
	S3Bucket     string
	S3ObjectKey  string
	S3ObjectSize int64
}

S3ObjectInfo contains information about the S3 object

func ParseNotification

func ParseNotification(message string) ([]*S3ObjectInfo, error)

ParseNotification parses a message received

type SQSClassifier added in v1.8.0

type SQSClassifier struct {
	Resolver   logtypes.Resolver
	LoadSource func(id string) (*models.SourceIntegration, error)
	// contains filtered or unexported fields
}

func (*SQSClassifier) Classify added in v1.8.0

func (*SQSClassifier) ParserStats added in v1.8.0

func (c *SQSClassifier) ParserStats() map[string]*classification.ParserStats

func (*SQSClassifier) Stats added in v1.8.0

type SnsNotification

type SnsNotification struct {
	events.SNSEntity
	Token *string `json:"Token"`
}

SnsNotification struct represents an SNS message arriving to Panther SQS from a customer account. The message can either be of type 'Notification' or 'SubscriptionConfirmation' Since there is no AWS SDK-provided struct to represent both types we had to create this custom type to include fields from both types.

Jump to

Keyboard shortcuts

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