mayor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotRunning     = errors.New("mayor not running")
	ErrAlreadyRunning = errors.New("mayor already running")
)

Common errors

Functions

func SessionName

func SessionName() string

SessionName returns the tmux session name for the mayor. This is a package-level function for convenience.

Types

type Manager

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

Manager handles mayor lifecycle operations.

func NewManager

func NewManager(townRoot string) *Manager

NewManager creates a new mayor manager for a town.

func (*Manager) IsRunning

func (m *Manager) IsRunning() (bool, error)

IsRunning checks if the mayor session is active.

func (*Manager) SessionName

func (m *Manager) SessionName() string

SessionName returns the tmux session name for the mayor.

func (*Manager) Start

func (m *Manager) Start(agentOverride string) error

Start starts the mayor session. agentOverride optionally specifies a different agent alias to use.

func (*Manager) Status

func (m *Manager) Status() (*tmux.SessionInfo, error)

Status returns information about the mayor session.

func (*Manager) Stop

func (m *Manager) Stop() error

Stop stops the mayor session.

Jump to

Keyboard shortcuts

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