events

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArtifactPubEvent

func CreateArtifactPubEvent(ctx context.Context, key string) (*cloudevents.Event, error)

CreateArtifactPubEvent creates a NewArtifactPublishedEvent CDEvent that is published as a CloudEvent. The key is the sha256 of the *processor.Document bytes that will be used to retrieve the processor.Document stored in the blob store. TODO (pxp928): change to use URI Reference field once the PR merges: https://github.com/cdevents/spec/pull/171

func DecodeEventSubject

func DecodeEventSubject(ctx context.Context, collectedEvent []byte) (string, error)

DecodeEventSubject takes in the collectedEvent bytes and converts it back into a CloudEvent to retrieve the necessary fields. The returned value is the subject of the event.

func GetKey

func GetKey(blob []byte) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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