service

package
v0.0.0-...-bb45038 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address  string // Server address to listen on
	NodeName string // Name of the run I'm running now
}

Config for the storage provisioner

type Provisioner

type Provisioner struct {
	Log logging.Logger
	Config
}

Provisioner implements a Local storage provisioner

func New

func New(config Config) (*Provisioner, error)

New creates a new local storage provisioner

func (*Provisioner) GetInfo

func (p *Provisioner) GetInfo(ctx context.Context, localPath string) (provisioner.Info, error)

GetInfo fetches information from the filesystem containing the given local path.

func (*Provisioner) GetNodeInfo

func (p *Provisioner) GetNodeInfo(ctx context.Context) (provisioner.NodeInfo, error)

GetNodeInfo fetches information from the current node.

func (*Provisioner) Prepare

func (p *Provisioner) Prepare(ctx context.Context, localPath string) error

Prepare a volume at the given local path

func (*Provisioner) Remove

func (p *Provisioner) Remove(ctx context.Context, localPath string) error

Remove a volume with the given local path

func (*Provisioner) Run

func (p *Provisioner) Run(ctx context.Context)

Run the provisioner until the given context is canceled.

func (*Provisioner) WrapLogger

func (p *Provisioner) WrapLogger(in *zerolog.Event) *zerolog.Event

Jump to

Keyboard shortcuts

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