Help us shape the future of Go! Take the 2026 Go Developer Survey

firehose

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferingHints

type BufferingHints struct {
	IntervalInSeconds int
	SizeInMBs         int
}

BufferingHints holds S3 buffering configuration for a destination.

type DeliveryStream

type DeliveryStream struct {
	Name         string
	ARN          string
	Status       deliveryStreamStatus
	Type         string
	Destinations []Destination
	Tags         map[string]string
	Records      []Record
	CreatedAt    time.Time
}

DeliveryStream represents an in-memory Firehose delivery stream.

type Destination

type Destination struct {
	DestinationId  string
	S3BucketARN    string
	S3Prefix       string
	RoleARN        string
	BufferingHints BufferingHints
}

Destination holds a single delivery destination for a stream.

type FirehoseService

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

FirehoseService is the cloudmock implementation of the AWS Data Firehose API.

func New

func New(accountID, region string) *FirehoseService

New returns a new FirehoseService for the given AWS account ID and region.

func (*FirehoseService) Actions

func (s *FirehoseService) Actions() []service.Action

Actions returns the list of Firehose API actions supported by this service.

func (*FirehoseService) HandleRequest

func (s *FirehoseService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes an incoming Firehose request to the appropriate handler. Firehose uses the JSON protocol; the action is parsed from X-Amz-Target by the gateway and placed in ctx.Action (e.g. "CreateDeliveryStream").

func (*FirehoseService) HealthCheck

func (s *FirehoseService) HealthCheck() error

HealthCheck always returns nil (no external dependencies).

func (*FirehoseService) Name

func (s *FirehoseService) Name() string

Name returns the AWS service name used for routing.

type Record

type Record struct {
	RecordId  string
	Data      []byte
	Timestamp time.Time
}

Record holds a single in-memory Firehose record.

type Store

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

Store is the in-memory store for Firehose delivery streams.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates a new empty Firehose Store.

func (*Store) CreateDeliveryStream

func (s *Store) CreateDeliveryStream(
	name, streamType string,
	dest Destination,
) (string, *service.AWSError)

CreateDeliveryStream creates a new delivery stream.

func (*Store) DeleteDeliveryStream

func (s *Store) DeleteDeliveryStream(name string) *service.AWSError

DeleteDeliveryStream removes a delivery stream by name.

func (*Store) GetDeliveryStream

func (s *Store) GetDeliveryStream(name string) (*DeliveryStream, *service.AWSError)

GetDeliveryStream returns the delivery stream by name.

func (*Store) ListDeliveryStreams

func (s *Store) ListDeliveryStreams() []string

ListDeliveryStreams returns a sorted list of delivery stream names.

func (*Store) ListTags

func (s *Store) ListTags(streamName string) (map[string]string, *service.AWSError)

ListTags returns a copy of the tags for a delivery stream.

func (*Store) PutRecord

func (s *Store) PutRecord(streamName string, data []byte) (string, *service.AWSError)

PutRecord appends a single record to the delivery stream and returns its RecordId.

func (*Store) PutRecordBatch

func (s *Store) PutRecordBatch(streamName string, records [][]byte) ([]string, *service.AWSError)

PutRecordBatch appends multiple records and returns a slice of RecordIds in the same order as the input. All records are appended; no partial failures occur in this in-memory implementation.

func (*Store) TagStream

func (s *Store) TagStream(streamName string, tags map[string]string) *service.AWSError

TagStream adds or updates tags on a delivery stream.

func (*Store) UntagStream

func (s *Store) UntagStream(streamName string, tagKeys []string) *service.AWSError

UntagStream removes tags from a delivery stream.

func (*Store) UpdateDestination

func (s *Store) UpdateDestination(streamName, destinationID string, update Destination) *service.AWSError

UpdateDestination replaces the S3 configuration for an existing destination.

Jump to

Keyboard shortcuts

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