Documentation ¶
Index ¶
- Constants
- Variables
- func NewAWSSession(creds Credentials) *session.Session
- type App
- func (app *App) DecodeSQSMessages(messages []*sqs.Message) ([]SQSMessage, error)
- func (app *App) DeleteSQSMessage(messageID, QueueUrl string, receiptHandle *string) error
- func (app *App) Init(creds Credentials)
- func (app *App) PollSQS(params *Params) error
- func (app *App) ProcessSQSEvent(params *Params, messages []*sqs.Message) error
- func (app *App) ReadSQSMessage(QueueUrl string, batchSize, timeout int64) (*sqs.ReceiveMessageOutput, error)
- func (app *App) ValidateSQSMessages(messages []SQSMessage) error
- func (app *App) WriteMessagesToKinesisStream(stream string, sqsMessage []SQSMessage) error
- type Credentials
- type Event
- type KinesisClient
- func (kc *KinesisClient) BatchedDelete() error
- func (kc *KinesisClient) BatchedWrite(records *kinesis.PutRecordsInput) (*kinesis.PutRecordsOutput, error)
- func (kc *KinesisClient) Delete() error
- func (kc *KinesisClient) Read() error
- func (kc *KinesisClient) Write(record *kinesis.PutRecordInput) (*kinesis.PutRecordOutput, error)
- type KinesisRecord
- type Message
- type NetworkConnection
- type Params
- type Process
- type SQSClient
- func (sc *SQSClient) BatchedDelete(message *sqs.DeleteMessageBatchInput) (*sqs.DeleteMessageBatchOutput, error)
- func (sc *SQSClient) BatchedWrite() error
- func (sc *SQSClient) Delete(message *sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error)
- func (sc *SQSClient) Read(message *sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error)
- func (sc *SQSClient) Write(message *sqs.SendMessageInput) (*sqs.SendMessageOutput, error)
- type SQSMessage
Constants ¶
View Source
const (
UTC = "2006-01-02T15:04:05.999999Z"
)
Variables ¶
Functions ¶
func NewAWSSession ¶
func NewAWSSession(creds Credentials) *session.Session
Types ¶
type App ¶
type App struct { SQSClient *SQSClient KinesisClient *KinesisClient Params *Params }
func (*App) DecodeSQSMessages ¶
func (app *App) DecodeSQSMessages(messages []*sqs.Message) ([]SQSMessage, error)
func (*App) DeleteSQSMessage ¶
func (*App) Init ¶
func (app *App) Init(creds Credentials)
func (*App) ProcessSQSEvent ¶
func (*App) ReadSQSMessage ¶
func (*App) ValidateSQSMessages ¶
func (app *App) ValidateSQSMessages(messages []SQSMessage) error
func (*App) WriteMessagesToKinesisStream ¶
func (app *App) WriteMessagesToKinesisStream(stream string, sqsMessage []SQSMessage) error
type Credentials ¶
type Credentials struct { AccessKey string `json:"access_key"` SecretAccessKey string `json:"secret_access_key"` SessionToken string `json:"session_token"` Region string `json:"region"` EndPoint *string `json:"end_point"` }
func (Credentials) String ¶
func (c Credentials) String() string
type Event ¶
type Event struct { Processes []Process `json:"new_process"` NetworkConnections []NetworkConnection `json:"network_connection"` }
type KinesisClient ¶
type KinesisClient struct {
// contains filtered or unexported fields
}
func NewKinesisClient ¶
func NewKinesisClient(session *session.Session) (*KinesisClient, error)
func (*KinesisClient) BatchedDelete ¶
func (kc *KinesisClient) BatchedDelete() error
func (*KinesisClient) BatchedWrite ¶
func (kc *KinesisClient) BatchedWrite(records *kinesis.PutRecordsInput) (*kinesis.PutRecordsOutput, error)
func (*KinesisClient) Delete ¶
func (kc *KinesisClient) Delete() error
func (*KinesisClient) Read ¶
func (kc *KinesisClient) Read() error
func (*KinesisClient) Write ¶
func (kc *KinesisClient) Write(record *kinesis.PutRecordInput) (*kinesis.PutRecordOutput, error)
type KinesisRecord ¶
type KinesisRecord struct { RecordID string `json:"id"` Data []SQSMessage `json:"data"` Created string `json:"created"` }
type NetworkConnection ¶
type SQSClient ¶
type SQSClient struct {
// contains filtered or unexported fields
}
func (*SQSClient) BatchedDelete ¶
func (sc *SQSClient) BatchedDelete(message *sqs.DeleteMessageBatchInput) (*sqs.DeleteMessageBatchOutput, error)
func (*SQSClient) BatchedWrite ¶
func (*SQSClient) Delete ¶
func (sc *SQSClient) Delete(message *sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error)
func (*SQSClient) Read ¶
func (sc *SQSClient) Read(message *sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error)
func (*SQSClient) Write ¶
func (sc *SQSClient) Write(message *sqs.SendMessageInput) (*sqs.SendMessageOutput, error)
Click to show internal directories.
Click to hide internal directories.