Documentation
¶
Index ¶
- Constants
- func Definition() addon.AddonDefinition
- func RegisterDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *resultCapture) error
- func RegisterDeprovisionDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework) error
- func RegisterRotateDedicatedSaga(registry *saga.Registry, fw *addon.ProviderFramework, rc *rotateCapture) error
- func UndoBuildDedicatedResult(ctx context.Context, in BuildDedicatedResultIn, out BuildDedicatedResultOut) error
- func UndoBuildRotationResult(ctx context.Context, in BuildRotationResultIn, out BuildRotationResultOut) error
- func UndoChangePassword(ctx context.Context, in ChangePasswordIn, out ChangePasswordOut) error
- func UndoCreateDedicatedPool(ctx context.Context, in CreateDedicatedPoolIn, out CreateDedicatedPoolOut) error
- func UndoCreateRabbitmqServer(ctx context.Context, in CreateRabbitmqServerIn, out CreateRabbitmqServerOut) error
- func UndoDecodeDedicatedAttrs(ctx context.Context, in DecodeDedicatedAttrsIn, out DecodeDedicatedAttrsOut) error
- func UndoDeleteDedicatedServerEntity(ctx context.Context, in DeleteDedicatedServerEntityIn, ...) error
- func UndoGenerateCredentials(ctx context.Context, in GenerateCredentialsIn, out GenerateCredentialsOut) error
- func UndoLoadRotationState(ctx context.Context, in LoadRotationStateIn, out LoadRotationStateOut) error
- func UndoLookupDedicatedServer(ctx context.Context, in LookupDedicatedServerIn, out LookupDedicatedServerOut) error
- func UndoUpdateDedicatedServer(ctx context.Context, in UpdateDedicatedServerIn, out UpdateDedicatedServerOut) error
- func UndoUpdateServerPassword(ctx context.Context, in UpdateServerPasswordIn, out UpdateServerPasswordOut) error
- type BuildDedicatedResultIn
- type BuildDedicatedResultOut
- type BuildRotationResultIn
- type BuildRotationResultOut
- type ChangePasswordIn
- type ChangePasswordOut
- type CreateDedicatedPoolIn
- type CreateDedicatedPoolOut
- type CreateRabbitmqServerIn
- type CreateRabbitmqServerOut
- type DecodeDedicatedAttrsIn
- type DecodeDedicatedAttrsOut
- type DeleteDedicatedServerEntityIn
- type DeleteDedicatedServerEntityOut
- type GenerateCredentialsIn
- type GenerateCredentialsOut
- type LoadRotationStateIn
- type LoadRotationStateOut
- type LookupDedicatedServerIn
- type LookupDedicatedServerOut
- type Provider
- func (p *Provider) Deprovision(ctx context.Context, assoc addon.AddonAssociation) error
- func (p *Provider) Provision(ctx context.Context, app addon.App, variant addon.Variant) (*addon.ProvisionResult, error)
- func (p *Provider) RotateCredential(ctx context.Context, assoc addon.AddonAssociation, ...) (*addon.RotationResult, error)
- type UpdateDedicatedServerIn
- type UpdateDedicatedServerOut
- type UpdateServerPasswordIn
- type UpdateServerPasswordOut
Constants ¶
const ( AddonName = "miren-rabbitmq" BaseImage = "oci.miren.cloud/rabbitmq" DefaultVersion = "4" )
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 RabbitMQ rotation saga.
func UndoBuildDedicatedResult ¶
func UndoBuildDedicatedResult(ctx context.Context, in BuildDedicatedResultIn, out BuildDedicatedResultOut) error
func UndoBuildRotationResult ¶ added in v0.12.1
func UndoBuildRotationResult(ctx context.Context, in BuildRotationResultIn, out BuildRotationResultOut) error
func UndoChangePassword ¶ added in v0.12.1
func UndoChangePassword(ctx context.Context, in ChangePasswordIn, out ChangePasswordOut) error
func UndoCreateDedicatedPool ¶
func UndoCreateDedicatedPool(ctx context.Context, in CreateDedicatedPoolIn, out CreateDedicatedPoolOut) error
func UndoCreateRabbitmqServer ¶
func UndoCreateRabbitmqServer(ctx context.Context, in CreateRabbitmqServerIn, out CreateRabbitmqServerOut) error
func UndoDecodeDedicatedAttrs ¶
func UndoDecodeDedicatedAttrs(ctx context.Context, in DecodeDedicatedAttrsIn, out DecodeDedicatedAttrsOut) error
func UndoDeleteDedicatedServerEntity ¶
func UndoDeleteDedicatedServerEntity(ctx context.Context, in DeleteDedicatedServerEntityIn, out DeleteDedicatedServerEntityOut) error
func UndoGenerateCredentials ¶
func UndoGenerateCredentials(ctx context.Context, in GenerateCredentialsIn, out GenerateCredentialsOut) error
func UndoLoadRotationState ¶ added in v0.12.1
func UndoLoadRotationState(ctx context.Context, in LoadRotationStateIn, out LoadRotationStateOut) error
func UndoLookupDedicatedServer ¶
func UndoLookupDedicatedServer(ctx context.Context, in LookupDedicatedServerIn, out LookupDedicatedServerOut) error
func UndoUpdateDedicatedServer ¶
func UndoUpdateDedicatedServer(ctx context.Context, in UpdateDedicatedServerIn, out UpdateDedicatedServerOut) error
func UndoUpdateServerPassword ¶ added in v0.12.1
func UndoUpdateServerPassword(ctx context.Context, in UpdateServerPasswordIn, out UpdateServerPasswordOut) error
Types ¶
type BuildDedicatedResultIn ¶
type BuildDedicatedResultOut ¶
type BuildDedicatedResultOut struct {
Done bool
}
func BuildDedicatedResult ¶
func BuildDedicatedResult(ctx context.Context, in BuildDedicatedResultIn) (BuildDedicatedResultOut, error)
type BuildRotationResultIn ¶ added in v0.12.1
type BuildRotationResultOut ¶ added in v0.12.1
type BuildRotationResultOut struct {
Done bool
}
func BuildRotationResult ¶ added in v0.12.1
func BuildRotationResult(ctx context.Context, in BuildRotationResultIn) (BuildRotationResultOut, error)
type ChangePasswordIn ¶ added in v0.12.1
type ChangePasswordOut ¶ added in v0.12.1
type ChangePasswordOut struct {
// Gates the entity update on the engine actually changing; passed as data
// (not a bare edge) so the consumer could verify it if it wanted to.
PasswordChanged bool `saga:"rmq_password_changed"`
}
func ChangePassword ¶ added in v0.12.1
func ChangePassword(ctx context.Context, in ChangePasswordIn) (ChangePasswordOut, error)
type CreateDedicatedPoolIn ¶
type CreateDedicatedPoolOut ¶
func CreateDedicatedPool ¶
func CreateDedicatedPool(ctx context.Context, in CreateDedicatedPoolIn) (CreateDedicatedPoolOut, error)
type CreateRabbitmqServerIn ¶
type CreateRabbitmqServerOut ¶
func CreateRabbitmqServer ¶
func CreateRabbitmqServer(ctx context.Context, in CreateRabbitmqServerIn) (CreateRabbitmqServerOut, error)
type DecodeDedicatedAttrsIn ¶
type DecodeDedicatedAttrsOut ¶
func DecodeDedicatedAttrs ¶
func DecodeDedicatedAttrs(ctx context.Context, in DecodeDedicatedAttrsIn) (DecodeDedicatedAttrsOut, error)
type DeleteDedicatedServerEntityOut ¶
type DeleteDedicatedServerEntityOut struct {
ServerDeleted bool
}
func DeleteDedicatedServerEntity ¶
func DeleteDedicatedServerEntity(ctx context.Context, in DeleteDedicatedServerEntityIn) (DeleteDedicatedServerEntityOut, error)
type GenerateCredentialsIn ¶
type GenerateCredentialsIn struct {
AppName string
}
type GenerateCredentialsOut ¶
type GenerateCredentialsOut struct {
Password string `saga:"password"`
Username string `saga:"username"`
Vhost string `saga:"vhost"`
ServiceName string `saga:"servicename"`
ServerName string `saga:"servername"`
}
func GenerateCredentials ¶
func GenerateCredentials(ctx context.Context, in GenerateCredentialsIn) (GenerateCredentialsOut, error)
type LoadRotationStateIn ¶ added in v0.12.1
type LoadRotationStateOut ¶ added in v0.12.1
type LoadRotationStateOut struct {
RotatePoolID entity.Id `saga:"rotatepoolid"`
RotateOldPassword string `saga:"rotateoldpassword"`
RotateServiceHost string `saga:"rotateservicehost"`
}
func LoadRotationState ¶ added in v0.12.1
func LoadRotationState(ctx context.Context, in LoadRotationStateIn) (LoadRotationStateOut, error)
type LookupDedicatedServerIn ¶
type LookupDedicatedServerOut ¶
type LookupDedicatedServerOut struct {
DedicatedServiceID entity.Id `saga:"dedicatedserviceid"`
DedicatedPoolID entity.Id `saga:"dedicatedpoolid"`
DedicatedServerName string `saga:"dedicatedservername"`
}
func LookupDedicatedServer ¶
func LookupDedicatedServer(ctx context.Context, in LookupDedicatedServerIn) (LookupDedicatedServerOut, error)
type Provider ¶
type Provider struct {
dbsaga.BaseProvider
}
func NewProvider ¶
func NewProvider(fw *addon.ProviderFramework) *Provider
func (*Provider) Deprovision ¶
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 RabbitMQ. A dedicated server has a single credential: the `miren` user's password, which the app connects with.
RabbitMQ is the outlier. Its password lives inside the node's mnesia database (seeded once at first boot from RABBITMQ_DEFAULT_PASS), AMQP has no password-change operation, and only the AMQP port is exposed, so there is no way to rotate it over the network like the SQL engines. Instead we run `rabbitmqctl change_password` inside the running container, record the new value on the server entity, and hand the app fresh connection vars to redeploy on. rabbitmqctl authenticates to the node via the Erlang cookie, not the user password, so a crashed retry converges no matter which password the node currently holds (no try-both dance needed).
type UpdateDedicatedServerIn ¶
type UpdateDedicatedServerOut ¶
type UpdateDedicatedServerOut struct {
Updated bool
}
func UpdateDedicatedServer ¶
func UpdateDedicatedServer(ctx context.Context, in UpdateDedicatedServerIn) (UpdateDedicatedServerOut, error)
type UpdateServerPasswordIn ¶ added in v0.12.1
type UpdateServerPasswordOut ¶ added in v0.12.1
type UpdateServerPasswordOut struct {
Recorded bool
}
func UpdateServerPassword ¶ added in v0.12.1
func UpdateServerPassword(ctx context.Context, in UpdateServerPasswordIn) (UpdateServerPasswordOut, error)