registry

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0, MIT Imports: 13 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 DeleteRemote added in v0.2.0

func DeleteRemote(sshTarget, name string) error

DeleteRemote removes name from the registry on sshTarget.

func Load

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

func Put

func Put(a App) error

func PutRemote added in v0.2.0

func PutRemote(sshTarget string, a App) error

PutRemote records a in the registry on sshTarget, as an app local to that host.

func Update

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

Update read-modify-writes the registry under an exclusive lock (mu + flock), the only safe path given concurrent 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