Documentation ¶
Index ¶
- 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
- type ManifestCodec
Constants ¶
This section is empty.
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 an agent.
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 status of a ManifestWork to a cloudevent with ManifestBundleStatus.
func (*ManifestBundleCodec) EventDataType ¶
func (c *ManifestBundleCodec) EventDataType() types.CloudEventsDataType
EventDataType always returns the event data type `io.open-cluster-management.works.v1alpha1.manifestbundles`.
type ManifestCodec ¶
type ManifestCodec struct {
// contains filtered or unexported fields
}
ManifestCodec is a codec to encode/decode a ManifestWork/cloudevent with ManifestBundle for an agent.
func NewManifestCodec ¶
func NewManifestCodec(restMapper meta.RESTMapper) *ManifestCodec
func (*ManifestCodec) Decode ¶
func (c *ManifestCodec) Decode(evt *cloudevents.Event) (*workv1.ManifestWork, error)
Decode a cloudevent whose data is Manifest to a ManifestWork.
func (*ManifestCodec) Encode ¶
func (c *ManifestCodec) Encode(source string, eventType types.CloudEventsType, work *workv1.ManifestWork) (*cloudevents.Event, error)
Encode the status of a ManifestWork to a cloudevent with ManifestStatus.
func (*ManifestCodec) EventDataType ¶
func (c *ManifestCodec) EventDataType() types.CloudEventsDataType
EventDataType returns the event data type for `io.open-cluster-management.works.v1alpha1.manifests`.