Documentation
¶
Index ¶
- Constants
- Variables
- func LooksLikeSyncedPath(path string) bool
- func NewHandler(opts HandlerOptions) (http.Handler, error)
- func PrepareStateDir(path string) (string, error)
- func ResolveStateDir(path string) (string, error)
- func Serve(ctx context.Context, cfg config.Config, opts Options, logOut io.Writer) error
- func ValidateMCPPath(value string) (string, error)
- type HandlerOptions
- type Options
- type SecretResult
- type ServeResult
- type StateLock
Constants ¶
View Source
const ( DefaultHostname = "dbrain" DefaultMCPPath = "/mcp" DefaultStartupTimeout = 45 * time.Second )
View Source
const SecretCommandTimeout = 10 * time.Second
View Source
const StateLockName = "dbrain.lock"
Variables ¶
View Source
var ErrAlreadyLocked = errors.New("state dir is already locked by another dbrain process")
Functions ¶
func LooksLikeSyncedPath ¶
func NewHandler ¶
func NewHandler(opts HandlerOptions) (http.Handler, error)
func PrepareStateDir ¶
func ResolveStateDir ¶
func ValidateMCPPath ¶
Types ¶
type HandlerOptions ¶
type Options ¶
type Options struct {
Web bool
MCP bool
MCPPath string
Hostname string
StateDir string
Listen string
TLS bool
StartupTimeout time.Duration
AuthKey string
AuthKeyRef string
AuthKeyCommand []string
AllowSecretCommand bool
AdvertiseTags []string
ControlURL string
Verbose bool
OnReady func()
SchedulerStatus func() schedulerstate.SyncAllStatus
}
type SecretResult ¶
func ResolveAuthKey ¶
func ResolveAuthKey(ctx context.Context, opts Options) (SecretResult, error)
type ServeResult ¶
Click to show internal directories.
Click to hide internal directories.