MCPcopy Create free account
hub / github.com/compozy/agh / newDefaultServer

Function newDefaultServer

internal/api/httpapi/server.go:492–503  ·  view source on GitHub ↗
(homePaths aghconfig.HomePaths)

Source from the content-addressed store, hash-verified

490}
491
492func newDefaultServer(homePaths aghconfig.HomePaths) *Server {
493 return &Server{
494 homePaths: homePaths,
495 config: aghconfig.DefaultWithHome(homePaths),
496 logger: slog.Default(),
497 now: func() time.Time {
498 return time.Now().UTC()
499 },
500 pollInterval: defaultPollInterval,
501 agentLoader: aghconfig.LoadAgentDef,
502 }
503}
504
505func applyOptions(server *Server, opts []Option) {
506 for _, opt := range opts {

Callers 1

NewFunction · 0.70

Calls 1

NowMethod · 0.45

Tested by

no test coverage detected