MCPcopy Create free account
hub / github.com/docker/docker-agent / CreateSession

Method CreateSession

pkg/runtime/client.go:299–303  ·  view source on GitHub ↗

CreateSession creates a new session

(ctx context.Context, sessTemplate *session.Session)

Source from the content-addressed store, hash-verified

297
298// CreateSession creates a new session
299func (c *Client) CreateSession(ctx context.Context, sessTemplate *session.Session) (*session.Session, error) {
300 var sess session.Session
301 err := c.doRequest(ctx, http.MethodPost, "/api/sessions", sessTemplate, &sess)
302 return &sess, err
303}
304
305// ResumeSession resumes a session by ID with optional rejection reason or tool name
306func (c *Client) ResumeSession(ctx context.Context, id, confirmation, reason, toolName string) error {

Callers 1

CreateSessionMethod · 0.95

Calls 1

doRequestMethod · 0.95

Tested by

no test coverage detected