Documentation ¶
Index ¶
- Constants
- type ManifestBundleCodec
- func (c *ManifestBundleCodec) Decode(evt *cloudevents.Event) (*workv1.ManifestWork, error)
- func (c *ManifestBundleCodec) Encode(source string, eventType types.CloudEventsType, work *workv1.ManifestWork) (*cloudevents.Event, error)
- func (c *ManifestBundleCodec) EventDataType() types.CloudEventsDataType
Constants ¶
View Source
const ExtensionWorkMeta = "metadata"
ExtensionWorkMeta is an extension attribute for work meta data.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManifestBundleCodec ¶
type ManifestBundleCodec struct{}
ManifestBundleCodec is a codec to encode/decode a ManifestWork/cloudevent with ManifestBundle for a source.
func NewManifestBundleCodec ¶
func NewManifestBundleCodec() *ManifestBundleCodec
func (*ManifestBundleCodec) Decode ¶
func (c *ManifestBundleCodec) Decode(evt *cloudevents.Event) (*workv1.ManifestWork, error)
Decode a cloudevent whose data is ManifestBundle to a ManifestWork.
func (*ManifestBundleCodec) Encode ¶
func (c *ManifestBundleCodec) Encode(source string, eventType types.CloudEventsType, work *workv1.ManifestWork) (*cloudevents.Event, error)
Encode the spec of a ManifestWork to a cloudevent with ManifestBundle.
func (*ManifestBundleCodec) EventDataType ¶
func (c *ManifestBundleCodec) EventDataType() types.CloudEventsDataType
EventDataType always returns the event data type `io.open-cluster-management.works.v1alpha1.manifestbundles`.
Click to show internal directories.
Click to hide internal directories.