Documentation
¶
Index ¶
- func New(specJSON []byte, _ database.DB, logger *zap.Logger) (provisioner.Provisioner, error)
- type Provisioner
- func (p *Provisioner) AwaitReady(ctx context.Context, r *provisioner.Resource) error
- func (p *Provisioner) Check(ctx context.Context) error
- func (p *Provisioner) CheckResource(ctx context.Context, r *provisioner.Resource, ...) (*provisioner.Resource, error)
- func (p *Provisioner) Close() error
- func (p *Provisioner) Deprovision(ctx context.Context, r *provisioner.Resource) error
- func (p *Provisioner) Provision(ctx context.Context, r *provisioner.Resource, ...) (*provisioner.Resource, error)
- func (p *Provisioner) Supports(rt provisioner.ResourceType) bool
- func (p *Provisioner) Type() string
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(specJSON []byte, _ database.DB, logger *zap.Logger) (provisioner.Provisioner, error)
Types ¶
type Provisioner ¶
type Provisioner struct {
// contains filtered or unexported fields
}
Provisioner provisions Clickhouse resources using a static, multi-tenant Clickhouse service. It creates a new (virtual) database and user with access restricted to that database for each resource.
func (*Provisioner) AwaitReady ¶
func (p *Provisioner) AwaitReady(ctx context.Context, r *provisioner.Resource) error
func (*Provisioner) CheckResource ¶
func (p *Provisioner) CheckResource(ctx context.Context, r *provisioner.Resource, opts *provisioner.ResourceOptions) (*provisioner.Resource, error)
func (*Provisioner) Close ¶
func (p *Provisioner) Close() error
func (*Provisioner) Deprovision ¶
func (p *Provisioner) Deprovision(ctx context.Context, r *provisioner.Resource) error
func (*Provisioner) Provision ¶
func (p *Provisioner) Provision(ctx context.Context, r *provisioner.Resource, opts *provisioner.ResourceOptions) (*provisioner.Resource, error)
func (*Provisioner) Supports ¶ added in v0.53.0
func (p *Provisioner) Supports(rt provisioner.ResourceType) bool
func (*Provisioner) Type ¶
func (p *Provisioner) Type() string
type Spec ¶
type Spec struct {
// DSN with admin permissions for a Clickhouse service.
// This will be used to create a new (virtual) database and access-restricted user for each provisioned resource.
DSN string `json:"dsn"`
// DSNEnv variable that contains the clickhouse DSN.
// This is an alternative to specifying the DSN directly, which can be useful for injecting secrets
DSNEnv string `json:"dsn_env"`
// WriteDSN is an optional DSN that should be used for write operations.
// If a write DSN is specified, it will be used for the provisioning operations.
WriteDSN string `json:"write_dsn,omitempty"`
// WriteDSNEnv optionally specifies an environment variable that should be used to populate WriteDSN.
WriteDSNEnv string `json:"write_dsn_env,omitempty"`
// Cluster name for ClickHouse cluster operations.
// If specified, all DDL operations will include an ON CLUSTER clause.
Cluster string `json:"cluster,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.