Documentation ¶
Index ¶
- Constants
- func CheckDeprecated(log logger.Logger, name, version string, versionSet Versioning)
- func IsInitialVersion(version string) bool
- func IsWasmComponentType(componentType string) bool
- func RegisterWasmComponentType(category Category, typeName string)
- type Category
- type ComponentHandler
- type ComponentLoader
- type DiskManifestLoader
- type KubernetesComponents
- type LocalComponents
- type ManifestLoader
- type VersionConstructor
- type Versioning
Constants ¶
const ( // Unstable version (v0). UnstableVersion = "v0" // First stable version (v1). FirstStableVersion = "v1" )
Variables ¶
This section is empty.
Functions ¶
func CheckDeprecated ¶ added in v1.12.0
func CheckDeprecated(log logger.Logger, name, version string, versionSet Versioning)
CheckDeprecated checks if a version is deprecated and logs a warning if it is using information derived from the version set.
func IsInitialVersion ¶ added in v1.0.0
IsInitialVersion returns true when a version is considered an unstable version (v0) or first stable version (v1). For backward compatibility, empty strings are also included.
func IsWasmComponentType ¶ added in v1.12.0
func RegisterWasmComponentType ¶ added in v1.12.0
Types ¶
type Category ¶ added in v1.9.0
type Category string
const ( CategoryBindings Category = "bindings" CategoryPubSub Category = "pubsub" CategorySecretStore Category = "secretstores" CategoryStateStore Category = "state" CategoryWorkflow Category = "workflow" CategoryWorkflowBackend Category = "workflowbackend" CategoryMiddleware Category = "middleware" CategoryConfiguration Category = "configuration" CategoryCryptoProvider Category = "crypto" CategoryLock Category = "lock" CategoryNameResolution Category = "nameresolution" )
supported components category
type ComponentHandler ¶
type ComponentHandler interface {
OnComponentUpdated(component componentsV1alpha1.Component)
}
ComponentHandler is an interface for reacting on component changes.
type ComponentLoader ¶
type ComponentLoader interface {
Load() ([]componentsV1alpha1.Component, error)
}
ComponentLoader is an interface for returning Dapr components.
type DiskManifestLoader ¶ added in v1.9.0
type DiskManifestLoader[T kubernetesManifest] struct {
// contains filtered or unexported fields
}
manifestLoader loads a specific manifest kind from a folder.
func NewDiskManifestLoader ¶ added in v1.9.0
func NewDiskManifestLoader[T kubernetesManifest](paths ...string) DiskManifestLoader[T]
NewDiskManifestLoader creates a new manifest loader for the given paths and kind.
func (DiskManifestLoader[T]) Load ¶ added in v1.9.0
func (m DiskManifestLoader[T]) Load() ([]T, error)
load loads manifests for the given directory.
func (*DiskManifestLoader[T]) SetZeroValueFn ¶ added in v1.11.0
func (m *DiskManifestLoader[T]) SetZeroValueFn(zvFn func() T)
SetZeroValueFn sets the function that returns the "zero" object of the given type. This can be used to set default values before unmarshalling.
type KubernetesComponents ¶
type KubernetesComponents struct {
// contains filtered or unexported fields
}
KubernetesComponents loads components in a kubernetes environment.
func NewKubernetesComponents ¶
func NewKubernetesComponents(configuration config.KubernetesConfig, namespace string, operatorClient operatorv1pb.OperatorClient, podName string) *KubernetesComponents
NewKubernetesComponents returns a new kubernetes loader.
func (*KubernetesComponents) Load ¶ added in v1.13.0
func (k *KubernetesComponents) Load() ([]componentsV1alpha1.Component, error)
LoadComponents returns components from a given control plane address.
type LocalComponents ¶ added in v1.11.0
type LocalComponents struct {
// contains filtered or unexported fields
}
LocalComponents loads components from a given directory.
func NewLocalComponents ¶ added in v1.11.0
func NewLocalComponents(resourcesPaths ...string) *LocalComponents
NewLocalComponents returns a new LocalComponents.
func (*LocalComponents) Load ¶ added in v1.13.0
func (s *LocalComponents) Load() ([]componentsV1alpha1.Component, error)
Load loads dapr components from a given directory.
type ManifestLoader ¶ added in v1.9.0
type ManifestLoader[T kubernetesManifest] interface { // Load loads all manifests. Load() ([]T, error) }
ManifestLoader loads manifest-like files.
type VersionConstructor ¶ added in v1.12.0
VersionConstructor is a version name func pair used to construct a component.
type Versioning ¶ added in v1.12.0
type Versioning struct { // Preferred is the preferred version to use, used to log a warning if a // deprecated version is used. Preferred VersionConstructor // Deprecated is a list of deprecated versions to log a warning if used. Deprecated []VersionConstructor // Others is a list of other versions that are supported, but not preferred. Others []VersionConstructor // Default is the default version to use when no version is specified. This // should make a VersionConstructor from the set above. Default string }
Versioning is a struct that contains the versioning information for a single component Type. It is expected that each VersionConstructor be unique.