Documentation ¶
Index ¶
- Constants
- func BuildClassifier(src *models.SourceIntegration, r logtypes.Resolver) (classification.ClassifierAPI, error)
- func ConfirmSubscription(notification *SnsNotification) (err error)
- func LoadSource(id string) (*models.SourceIntegration, error)
- func LoadSourceS3(bucketName, objectKey string) (*models.SourceIntegration, error)
- func ReadSnsMessage(ctx context.Context, message string) (result []*common.DataStream, err error)
- type ErrUnsupportedFileType
- type MessageForwarderReader
- type S3ObjectInfo
- type SQSClassifier
- type SnsNotification
Constants ¶
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
func BuildClassifier(src *models.SourceIntegration, r logtypes.Resolver) (classification.ClassifierAPI, error)
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
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
type S3ObjectInfo ¶
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 (c *SQSClassifier) Classify(log string) (*classification.ClassifierResult, error)
func (*SQSClassifier) ParserStats ¶ added in v1.8.0
func (c *SQSClassifier) ParserStats() map[string]*classification.ParserStats
func (*SQSClassifier) Stats ¶ added in v1.8.0
func (c *SQSClassifier) Stats() *classification.ClassifierStats
type SnsNotification ¶
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.