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

Method GetSession

pkg/session/store.go:153–162  ·  view source on GitHub ↗
(_ context.Context, id string)

Source from the content-addressed store, hash-verified

151}
152
153func (s *InMemorySessionStore) GetSession(_ context.Context, id string) (*Session, error) {
154 if id == "" {
155 return nil, ErrEmptyID
156 }
157 session, exists := s.sessions.Load(id)
158 if !exists {
159 return nil, ErrNotFound
160 }
161 return session, nil
162}
163
164func (s *InMemorySessionStore) GetSessions(_ context.Context) ([]*Session, error) {
165 sessions := make([]*Session, 0, s.sessions.Length())

Calls 1

LoadMethod · 0.80