package
0.6.1
Repository: https://github.com/cosi-project/runtime.git
Documentation: pkg.go.dev

# Functions

CreateResource creates an empty resource for a type.
FromResource converts a resource which supports spec protobuf marshaling to protobuf.Resource.
NewResourceSpec creates new ResourceSpec[T, S].
ProtoEqual returns true if the two messages are equal.
ProtoMarshal returns the wire-format encoding of m.
ProtoUnmarshal parses the wire-format message in b and places the result in m.
RegisterDynamic creates a mapping between resource type and its protobuf marshaller and unmarshaller.
RegisterResource creates a mapping between resource type and its protobuf unmarshaller.
Unmarshal protobuf marshaled resource into Resource.
UnmarshalResource converts proto.Resource to real resource if possible.
WithoutYAML disables YAML spec.

# Structs

FromResourceOptions is a set of options for FromResource.
Resource which can be marshaled and unmarshaled from protobuf.
ResourceSpec wraps proto.Message structures and adds DeepCopy and marshaling methods.
YAMLResource is a wrapper around Resource which implements yaml.Unmarshaler.

# Interfaces

DeepCopyable is a duplicate of [github.com/cosi-project/runtime/pkg/resource/typed.DeepCopyable] to prevent import cycles.
ProtoMarshaler is an interface which should be implemented by Resource spec to support conversion to protobuf.Resource.
ProtoUnmarshaler is an interface which should be implemented by Resource spec to support conversion from protobuf.Resource.
Res is type parameter constraint for RegisterResource.
ResourceUnmarshaler is an interface which should be implemented by Resource to support conversion from protobuf.Resource.
Spec should be proto.Message and pointer.
TypedResource is similar to [github.com/cosi-project/runtime/pkg/resource/typed.Resource] and required to prevent import cycles.

# Type aliases

FromResourceOption is an option for FromResource.