Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEOF = event.ErrEOF
Functions ¶
This section is empty.
Types ¶
type GetObjectInputEventReader ¶
type GetObjectInputEventReader struct { Client *s3.S3 GetObjectInput *s3.GetObjectInput // contains filtered or unexported fields }
GetObjectInputEventReader reads usage events from a *s3.GetObjectInput.
func (*GetObjectInputEventReader) Close ¶
func (r *GetObjectInputEventReader) Close() error
func (*GetObjectInputEventReader) Read ¶
func (r *GetObjectInputEventReader) Read(ctx context.Context) (model.MXPGVKEvent, error)
type ListObjectsV2InputEventReader ¶
type ListObjectsV2InputEventReader struct { Client *s3.S3 Bucket string ListObjectsV2Input *s3.ListObjectsV2Input // contains filtered or unexported fields }
ListBlobsResponseEventReader reads usage events from a *s3.ListObjectsV2Input.
func (*ListObjectsV2InputEventReader) Close ¶
func (r *ListObjectsV2InputEventReader) Close() error
func (*ListObjectsV2InputEventReader) Read ¶
func (r *ListObjectsV2InputEventReader) Read(ctx context.Context) (model.MXPGVKEvent, error)
type ListObjectsV2InputIterator ¶
type ListObjectsV2InputIterator struct { Bucket string Account string Iter *usagetime.WindowIterator }
ListObjectsV2InputIterator iterates through a []*s3.ListObjectsV2Input for each window of time in a time range. Must be initialized with NewListObjectsV2InputIterator().
func NewListObjectsV2InputIterator ¶
func NewListObjectsV2InputIterator(bucket string, account string, tr usagetime.Range, window time.Duration) (*ListObjectsV2InputIterator, error)
NewListObjectsV2InputIterator returns an initialized *ListObjectsV2InputIterator.
func (*ListObjectsV2InputIterator) More ¶
func (i *ListObjectsV2InputIterator) More() bool
More returns true if Next() has more to return.
func (*ListObjectsV2InputIterator) Next ¶
func (i *ListObjectsV2InputIterator) Next() ([]*s3.ListObjectsV2Input, usagetime.Range, error)
Next returns a []*s3.ListObjectsV2Input covering the next window of time, as well as a time range marking the window.
type WindowIterator ¶
type WindowIterator struct { Client *s3.S3 Bucket string Iter *ListObjectsV2InputIterator }
WindowIterator iterates through readers for windows of usage events from an S3 bucket. Must be initialized with NewWindowIterator().
func NewWindowIterator ¶
func NewWindowIterator(cli *s3.S3, bucket, account string, tr usagetime.Range, window time.Duration) (*WindowIterator, error)
NewWindowIterator returns an initialized *WindowIterator.
func (*WindowIterator) More ¶
func (i *WindowIterator) More() bool