Documentation ¶
Index ¶
Constants ¶
const (
EmitIntervalDefault = 1
)
Variables ¶
var ( EmitQueue chan EmitObject AssetIds map[string]string AssetIdLock sync.RWMutex )
Functions ¶
func EmitChanges ¶
func EmitChanges(emission Emission)
EmitChanges sends a json payload of cluster changes to a remote endpoint
func EmitChangesSQS ¶
EmitChangesSQS sends batches of records to SQS at between 1 to 10 at a time.
func SetAssetIds ¶
SetAssetIds accepts a config.Resource that will be used to determine the assetIds that will need to be included when emitting objects.
func StartEmitter ¶
func StartEmitter(c config.Config, q chan EmitObject)
StartEmitter sets up the emiter based on the configuration provided. If sqs is used, it'll initialize an SQS client used for publishing records to remote queues. It is responsible for polling the emit queue and sending records up to AWS.
func WasEmitted ¶
func WasEmitted(obj EmitObject) bool
WasEmitted looks up an object based on its payload's hash. It returns true if the object was sent previously (is considered duplicate) and false if it was never sent before.