Documentation
¶
Overview ¶
Package process_binding provides CRUD helpers for process bindings in the platform-account ObjectStore.
Index ¶
- Constants
- func DeleteProcessBinding(ctx context.Context, store kvtx.Store, spaceID string, ...) error
- func GetProcessBinding(ctx context.Context, store kvtx.Store, spaceID, objectKey string) (*s4wave_process.ProcessBinding, error)
- func ListProcessBindings(ctx context.Context, store kvtx.Store, spaceID string) ([]*s4wave_process.ProcessBinding, error)
- func ProcessBindingKey(spaceID, objectKey string) []byte
- func SetProcessBinding(ctx context.Context, store kvtx.Store, spaceID, objectKey string, ...) error
- type BindingRegistry
Constants ¶
const DefaultObjectStoreID = "platform-account"
DefaultObjectStoreID is the default ObjectStore for process bindings.
const ProcessBindingKeyPrefix = "process-binding"
ProcessBindingKeyPrefix is the prefix for process binding keys.
Variables ¶
This section is empty.
Functions ¶
func DeleteProcessBinding ¶
func DeleteProcessBinding(ctx context.Context, store kvtx.Store, spaceID string, binding *s4wave_process.ProcessBinding) error
DeleteProcessBinding deletes the stored binding of binding's object key if it still equals binding, so a newer decision for the key is kept.
func GetProcessBinding ¶
func GetProcessBinding(ctx context.Context, store kvtx.Store, spaceID, objectKey string) (*s4wave_process.ProcessBinding, error)
GetProcessBinding reads the ProcessBinding from the store. Returns nil, nil if the key is not found.
func ListProcessBindings ¶
func ListProcessBindings(ctx context.Context, store kvtx.Store, spaceID string) ([]*s4wave_process.ProcessBinding, error)
ListProcessBindings lists all process bindings for a given space.
func ProcessBindingKey ¶
ProcessBindingKey returns the KV key for a process binding. Key format: process-binding/{spaceID}/{objectKey}
func SetProcessBinding ¶
func SetProcessBinding(ctx context.Context, store kvtx.Store, spaceID, objectKey string, binding *s4wave_process.ProcessBinding) error
SetProcessBinding writes the ProcessBinding to the store.
Types ¶
type BindingRegistry ¶
type BindingRegistry struct {
// contains filtered or unexported fields
}
BindingRegistry reports committed process binding changes to resources of one Resource root. Storage remains authoritative across daemon restarts.
func NewBindingRegistry ¶
func NewBindingRegistry() *BindingRegistry
NewBindingRegistry constructs a process binding change registry.
func (*BindingRegistry) Changed ¶
func (r *BindingRegistry) Changed() <-chan struct{}
Changed returns a channel closed after the next committed binding change.
func (*BindingRegistry) NotifyChanged ¶
func (r *BindingRegistry) NotifyChanged()
NotifyChanged wakes binding watches after a committed decision.