app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deregister added in v0.1.2

func Deregister(ctx context.Context, root, projectID string) ([]config.Workspace, error)

Deregister forgets a Project on a profile whose service is not running.

It is the stopped-service half of the "remove_project_workspaces" IPC call, and it has to do the store's half too: the flush and heartbeat loops read their work from the store rather than from the configuration, so a row left behind here would go on publishing a repository to a Project that no longer exists the next time the service came up.

func RebindProject added in v0.1.2

func RebindProject(ctx context.Context, root, projectID, apiBaseURL, deviceID string) ([]config.Workspace, error)

RebindProject is the stopped-service half of the same move.

func Register

func Register(ctx context.Context, root, apiBaseURL, deviceID string, w config.Workspace) error

func Run

func Run(ctx context.Context, root string, senders SenderFactory) error

Types

type Sender

type Sender interface {
	Send(context.Context, string, []byte) error
}

type SenderFactory

type SenderFactory func(context.Context, config.Backend) (Sender, error)

SenderFactory builds the publisher for one backend. A profile holds one per distinct backend, so the credential a factory reads is the one stored for that backend's device identity.

func NewHostedSenders

func NewHostedSenders() SenderFactory

NewHostedSenders is the production publisher factory: one client per backend, each authenticated as the device identity this profile enrolled with that backend. A profile holding a local Project and a team Project therefore holds two credentials and two clients, and neither can be used against the other's server.

type Service

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

Jump to

Keyboard shortcuts

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