lsvd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoadServiceConfig = server.LoadServiceConfig

LoadServiceConfig re-exports server.LoadServiceConfig for use by the runner

View Source
var SaveServiceConfig = server.SaveServiceConfig

SaveServiceConfig re-exports server.SaveServiceConfig for use by the runner

Functions

This section is empty.

Types

type Component

type Component struct {
	// contains filtered or unexported fields
}

Component manages an lsvd-server as an outboard process

func NewComponent

func NewComponent(log *slog.Logger, dataPath string) *Component

NewComponent creates a new LSVD component

func (*Component) Close

func (c *Component) Close() error

Close implements io.Closer for use in closers list. If restart mode is set, it detaches from the process instead of stopping it.

func (*Component) Detach

func (c *Component) Detach() error

Detach disconnects from lsvd-server without stopping it. The process keeps running and can be reconnected later.

func (*Component) IsRunning

func (c *Component) IsRunning() bool

IsRunning returns whether lsvd-server is running

func (*Component) PID

func (c *Component) PID() (int, error)

PID returns the PID of the running lsvd-server process

func (*Component) RPCState

func (c *Component) RPCState() *rpc.State

RPCState returns the outboard RPC state for additional connections.

func (*Component) SetRestartMode

func (c *Component) SetRestartMode(v bool)

SetRestartMode sets whether the component should detach (preserve process) instead of stopping when Close() is called.

func (*Component) Start

func (c *Component) Start(ctx context.Context, config *Config) error

Start starts the lsvd-server as an outboard process

func (*Component) StartOrReconnect

func (c *Component) StartOrReconnect(ctx context.Context, config *Config) error

StartOrReconnect tries to reconnect to an existing lsvd-server, falling back to start.

func (*Component) Stop

func (c *Component) Stop(ctx context.Context) error

Stop stops the lsvd-server process

type Config

type Config struct {
	// Base directory for LSVD data (volumes, state file)
	DataPath string

	// Directory for outboard process files (config, FIFOs)
	// e.g., /var/lib/miren/outboard/lsvd-server
	OutboardPath string

	// Entity server RPC address (e.g., localhost:9000)
	EntityServerAddr string

	// Node ID for filtering entities
	NodeId string

	// Optional: additional environment variables
	Env []string
}

Config defines the configuration for running lsvd-server

type ServiceConfig

type ServiceConfig = server.ServiceConfig

ServiceConfig re-exports server.ServiceConfig for use by the runner

Directories

Path Synopsis
cmd
lsvd-server command
Command lsvd-server is a separate process that manages LSVD volumes and mounts.
Command lsvd-server is a separate process that manages LSVD volumes and mounts.

Jump to

Keyboard shortcuts

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