Documentation
¶
Index ¶
- func Deregister(ctx context.Context, root, projectID string) ([]config.Workspace, error)
- func RebindProject(ctx context.Context, root, projectID, apiBaseURL, deviceID string) ([]config.Workspace, error)
- func Register(ctx context.Context, root, apiBaseURL, deviceID string, w config.Workspace) error
- func Run(ctx context.Context, root string, senders SenderFactory) error
- type Sender
- type SenderFactory
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deregister ¶ added in v0.1.2
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.
Types ¶
type SenderFactory ¶
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.