MCPcopy Index your code
hub / github.com/docker/docker-agent / New

Function New

pkg/server/server.go:36–38  ·  view source on GitHub ↗
(ctx context.Context, sessionStore session.Store, runConfig *config.RuntimeConfig, refreshInterval time.Duration, agentSources config.Sources, authToken string)

Source from the content-addressed store, hash-verified

34}
35
36func New(ctx context.Context, sessionStore session.Store, runConfig *config.RuntimeConfig, refreshInterval time.Duration, agentSources config.Sources, authToken string) (*Server, error) {
37 return NewWithManager(NewSessionManager(ctx, agentSources, sessionStore, refreshInterval, runConfig), authToken), nil
38}
39
40// NewWithManager builds a Server around an already-constructed SessionManager.
41// Useful when the runtime is owned by another component (e.g. the TUI) and

Callers 5

runAPICommandMethod · 0.92
startCagentAPIFunction · 0.92
startServerFunction · 0.70
startServerWithStoreFunction · 0.70
startServerBareFunction · 0.70

Calls 2

NewWithManagerFunction · 0.85
NewSessionManagerFunction · 0.85

Tested by 4

startCagentAPIFunction · 0.74
startServerFunction · 0.56
startServerWithStoreFunction · 0.56
startServerBareFunction · 0.56