valkey

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddonName      = "miren-valkey"
	BaseImage      = "oci.miren.cloud/valkey"
	DefaultVersion = "9"
)
View Source
const (
	ConfigStorage = "storage"
)

Variables

This section is empty.

Functions

func Definition

func Definition() addon.AddonDefinition

func RegisterDedicatedSaga

func RegisterDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error

func RegisterDeprovisionDedicatedSaga

func RegisterDeprovisionDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error

func RegisterRotateDedicatedSaga added in v0.12.1

func RegisterRotateDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error

RegisterRotateDedicatedSaga registers the dedicated valkey rotation saga.

func UndoCaptureValkeyRotationResult added in v0.12.1

func UndoCaptureValkeyRotationResult(ctx context.Context, in CaptureValkeyRotationResultIn, out CaptureValkeyRotationResultOut) error

func UndoDecodeValkeyServerRef added in v0.12.1

func UndoDecodeValkeyServerRef(ctx context.Context, in DecodeValkeyServerRefIn, out DecodeValkeyServerRefOut) error

func UndoDeleteOldValkeyPool added in v0.12.1

func UndoDeleteOldValkeyPool(ctx context.Context, in DeleteOldValkeyPoolIn, out DeleteOldValkeyPoolOut) error

func UndoLoadValkeyRotationState added in v0.12.1

func UndoLoadValkeyRotationState(ctx context.Context, in LoadValkeyRotationStateIn, out LoadValkeyRotationStateOut) error

func UndoScaleDownOldValkeyPool added in v0.12.1

func UndoScaleDownOldValkeyPool(ctx context.Context, in ScaleDownOldValkeyPoolIn, out ScaleDownOldValkeyPoolOut) error

func UndoSetValkeyServerPassword added in v0.12.1

func UndoSetValkeyServerPassword(ctx context.Context, in SetValkeyServerPasswordIn, out SetValkeyServerPasswordOut) error

func UndoSwapValkeyPool added in v0.12.1

func UndoSwapValkeyPool(ctx context.Context, in SwapValkeyPoolIn, out SwapValkeyPoolOut) error

func UndoWaitValkeyPoolReady added in v0.12.1

func UndoWaitValkeyPoolReady(ctx context.Context, in WaitValkeyPoolReadyIn, out WaitValkeyPoolReadyOut) error

Types

type BuildDedicatedResultIn

type BuildDedicatedResultIn struct {
	ServiceHost string    `saga:"servicehost"`
	Password    string    `saga:"password"`
	ServerID    entity.Id `saga:"serverid"`
}

type BuildDedicatedResultOut

type BuildDedicatedResultOut struct {
	Done bool
}

type CaptureValkeyRotationResultIn added in v0.12.1

type CaptureValkeyRotationResultIn struct {
	RotateServiceHost string `saga:"rotateservicehost"`
	RotateNewPassword string `saga:"rotatenewpassword"`
}

type CaptureValkeyRotationResultOut added in v0.12.1

type CaptureValkeyRotationResultOut struct {
	Done bool
}

func CaptureValkeyRotationResult added in v0.12.1

type CreateDedicatedPoolIn

type CreateDedicatedPoolIn struct {
	ServerName    string            `saga:"servername"`
	AppName       string            `saga:"appname"`
	Password      string            `saga:"password"`
	VariantConfig map[string]string `saga:"variantconfig"`
}

type CreateDedicatedPoolOut

type CreateDedicatedPoolOut struct {
	PoolID entity.Id `saga:"poolid"`
}

type CreateValkeyServerIn

type CreateValkeyServerIn struct {
	ServerName  string `saga:"servername"`
	VariantName string `saga:"variantname"`
	Password    string `saga:"password"`
}

type CreateValkeyServerOut

type CreateValkeyServerOut struct {
	ServerID entity.Id `saga:"serverid"`
}

type DecodeDedicatedAttrsIn

type DecodeDedicatedAttrsIn struct {
	AssocEntity *entity.Entity `saga:"assocentity"`
}

type DecodeDedicatedAttrsOut

type DecodeDedicatedAttrsOut struct {
	DedicatedServerID entity.Id `saga:"dedicatedserverid"`
}

type DecodeValkeyServerRefIn added in v0.12.1

type DecodeValkeyServerRefIn struct {
	AssocEntity *entity.Entity `saga:"assocentity"`
}

type DecodeValkeyServerRefOut added in v0.12.1

type DecodeValkeyServerRefOut struct {
	RotateServerID entity.Id `saga:"rotateserverid"`
}

func DecodeValkeyServerRef added in v0.12.1

func DecodeValkeyServerRef(ctx context.Context, in DecodeValkeyServerRefIn) (DecodeValkeyServerRefOut, error)

type DeleteDedicatedServerEntityIn

type DeleteDedicatedServerEntityIn struct {
	DedicatedServerID   entity.Id `saga:"dedicatedserverid"`
	DedicatedServerName string    `saga:"dedicatedservername"`

	ServiceCleanedUp saga.Edge `saga:"dedicated_service_deleted"`
	PoolCleanedUp    saga.Edge `saga:"dedicated_pool_deleted"`
}

type DeleteDedicatedServerEntityOut

type DeleteDedicatedServerEntityOut struct {
	ServerDeleted bool
}

type DeleteOldValkeyPoolIn added in v0.12.1

type DeleteOldValkeyPoolIn struct {
	RotateOldPoolID entity.Id `saga:"rotateoldpoolid"`

	PoolReady saga.Edge `saga:"valkey_pool_ready"`
}

type DeleteOldValkeyPoolOut added in v0.12.1

type DeleteOldValkeyPoolOut struct {
	RotateOldPoolDeleted bool
}

func DeleteOldValkeyPool added in v0.12.1

func DeleteOldValkeyPool(ctx context.Context, in DeleteOldValkeyPoolIn) (DeleteOldValkeyPoolOut, error)

type GenerateCredentialsIn

type GenerateCredentialsIn struct {
	AppName string
}

type GenerateCredentialsOut

type GenerateCredentialsOut struct {
	Password    string `saga:"password"`
	ServiceName string `saga:"servicename"`
	ServerName  string `saga:"servername"`
}

type LoadValkeyRotationStateIn added in v0.12.1

type LoadValkeyRotationStateIn struct {
	RotateServerID entity.Id `saga:"rotateserverid"`
}

type LoadValkeyRotationStateOut added in v0.12.1

type LoadValkeyRotationStateOut struct {
	RotateOldPassword string    `saga:"rotateoldpassword"`
	RotateOldPoolID   entity.Id `saga:"rotateoldpoolid"`
	RotateServiceHost string    `saga:"rotateservicehost"`
}

func LoadValkeyRotationState added in v0.12.1

func LoadValkeyRotationState(ctx context.Context, in LoadValkeyRotationStateIn) (LoadValkeyRotationStateOut, error)

type LookupDedicatedServerIn

type LookupDedicatedServerIn struct {
	DedicatedServerID entity.Id `saga:"dedicatedserverid"`
}

type LookupDedicatedServerOut

type LookupDedicatedServerOut struct {
	DedicatedServiceID  entity.Id `saga:"dedicatedserviceid"`
	DedicatedPoolID     entity.Id `saga:"dedicatedpoolid"`
	DedicatedServerName string    `saga:"dedicatedservername"`
}

type Provider

type Provider struct {
	dbsaga.BaseProvider
}

func NewProvider

func NewProvider(fw *addon.ProviderFramework) *Provider

func (*Provider) Deprovision

func (p *Provider) Deprovision(ctx context.Context, assoc addon.AddonAssociation) error

func (*Provider) Provision

func (p *Provider) Provision(ctx context.Context, app addon.App, variant addon.Variant) (*addon.ProvisionResult, error)

func (*Provider) RotateCredential added in v0.12.1

func (p *Provider) RotateCredential(ctx context.Context, assoc addon.AddonAssociation, credential, newSecret string) (*addon.RotationResult, error)

RotateCredential implements addon.CredentialRotator for dedicated Valkey. Valkey has a single password (its requirepass, also the value consumers use), so the credential selector is ignored. It is safe to re-invoke with the same newSecret: if the running pool already uses it, the pool re-launch is skipped.

type ScaleDownOldValkeyPoolIn added in v0.12.1

type ScaleDownOldValkeyPoolIn struct {
	RotateOldPoolID entity.Id `saga:"rotateoldpoolid"`
}

type ScaleDownOldValkeyPoolOut added in v0.12.1

type ScaleDownOldValkeyPoolOut struct {
	// Edge producer: gates the pool swap, so the single-attach disk is released
	// before the new pool tries to attach it.
	RotatePoolScaledDown bool `saga:"valkey_pool_scaled_down"`
}

func ScaleDownOldValkeyPool added in v0.12.1

func ScaleDownOldValkeyPool(ctx context.Context, in ScaleDownOldValkeyPoolIn) (ScaleDownOldValkeyPoolOut, error)

type SetValkeyServerPasswordIn added in v0.12.1

type SetValkeyServerPasswordIn struct {
	RotateServerID    entity.Id `saga:"rotateserverid"`
	RotateNewPassword string    `saga:"rotatenewpassword"`
	RotateOldPassword string    `saga:"rotateoldpassword"`
}

type SetValkeyServerPasswordOut added in v0.12.1

type SetValkeyServerPasswordOut struct {
	RotatePasswordSet bool
}

func SetValkeyServerPassword added in v0.12.1

func SetValkeyServerPassword(ctx context.Context, in SetValkeyServerPasswordIn) (SetValkeyServerPasswordOut, error)

type SwapValkeyPoolIn added in v0.12.1

type SwapValkeyPoolIn struct {
	RotateServerID    entity.Id `saga:"rotateserverid"`
	RotateOldPoolID   entity.Id `saga:"rotateoldpoolid"`
	RotateNewPassword string    `saga:"rotatenewpassword"`

	PoolScaledDown saga.Edge `saga:"valkey_pool_scaled_down"`
}

type SwapValkeyPoolOut added in v0.12.1

type SwapValkeyPoolOut struct {
	RotateNewPoolID entity.Id `saga:"rotatenewpoolid"`
}

func SwapValkeyPool added in v0.12.1

func SwapValkeyPool(ctx context.Context, in SwapValkeyPoolIn) (SwapValkeyPoolOut, error)

type UpdateDedicatedServerIn

type UpdateDedicatedServerIn struct {
	ServerID    entity.Id `saga:"serverid"`
	PoolID      entity.Id `saga:"poolid"`
	ServiceID   entity.Id `saga:"serviceid"`
	ServiceHost string    `saga:"servicehost"`
	VariantName string    `saga:"variantname"`
	Password    string    `saga:"password"`
}

type UpdateDedicatedServerOut

type UpdateDedicatedServerOut struct {
	Updated bool
}

type WaitValkeyPoolReadyIn added in v0.12.1

type WaitValkeyPoolReadyIn struct {
	RotateNewPoolID entity.Id `saga:"rotatenewpoolid"`
}

type WaitValkeyPoolReadyOut added in v0.12.1

type WaitValkeyPoolReadyOut struct {
	// Edge producer: gates the old-pool delete on the new pool being healthy.
	RotatePoolReady bool `saga:"valkey_pool_ready"`
}

func WaitValkeyPoolReady added in v0.12.1

func WaitValkeyPoolReady(ctx context.Context, in WaitValkeyPoolReadyIn) (WaitValkeyPoolReadyOut, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL