registry

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package registry tracks the apps Skiff has deployed locally, in ~/.skiff/apps.json.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(name string) (bool, error)

func Load

func Load() (map[string]App, error)

func Put

func Put(a App) error

func Update

func Update(fn func(apps map[string]App)) error

Update runs fn against the current registry under an exclusive lock (process mutex + an flock on apps.lock) and persists the result — the only safe way to read-modify-write, since deploy, autoscale, and teardown mutate concurrently from several goroutines and separate OS processes.

Types

type App

type App struct {
	Name      string    `json:"name"`
	Container string    `json:"container"`          // representative replica (Replicas[0]), for status + back-compat
	Port      int       `json:"port"`               // port the app listens on inside the container
	HostPort  int       `json:"hostPort"`           // representative replica's published host port
	Host      string    `json:"host,omitempty"`     // remote ssh target ("" = local docker)
	Replicas  []Replica `json:"replicas,omitempty"` // every running container for the app
}

func List

func List() ([]App, error)

type Replica

type Replica struct {
	Container string `json:"container"`
	HostPort  int    `json:"hostPort"`
}

Replica is one running container of an app.

Jump to

Keyboard shortcuts

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