daemoncli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Overview

Package daemoncli provides the cobra commands for managing the Clank daemon. It is shared between the clank and clankd binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cobra.Command

Command returns the root cobra command for the clankd binary with start/stop/status subcommands.

func RunStart

func RunStart(foreground bool, opts ServerOptions) error

RunStart starts the daemon, either in foreground or as a background process. Exported so that ensureDaemon in the clank binary can call it directly.

Types

type ServerOptions

type ServerOptions struct {
	Listen string

	// Auth, when non-nil, overrides env-driven auth selection.
	// Embedders (supaclank, custom deployments) pass their own
	// pkg/auth.Authenticator here — Supabase, Auth0, custom DB
	// lookups, anything implementing the interface. When nil, TCP
	// mode picks an Authenticator from env vars (OIDC, HS256, or
	// opt-in static). Unix-socket mode always uses auth.AllowAll.
	Auth auth.Authenticator
}

ServerOptions configures the listener for the clankd Hub. Empty Listen means default Unix socket mode (laptop); "tcp://addr:port" enables TCP mode (self-hosted/cloud) with bearer-token auth.

Jump to

Keyboard shortcuts

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