registry

package
v0.1.2 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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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