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"`
// Path to a file that we should load the DSN from.
// This is an alternative to specifying the DSN directly, which can be useful for secrets management.
DSNPath string `json:"dsn_path"`
}
Click to show internal directories.
Click to hide internal directories.