github.com/containers/podman/v4@v4.9.4/pkg/bindings/system/info.go (about) 1 package system 2 3 import ( 4 "context" 5 "net/http" 6 7 "github.com/containers/podman/v4/libpod/define" 8 "github.com/containers/podman/v4/pkg/bindings" 9 ) 10 11 // Info returns information about the libpod environment and its stores 12 func Info(ctx context.Context, _ *InfoOptions) (*define.Info, error) { 13 conn, err := bindings.GetClient(ctx) 14 if err != nil { 15 return nil, err 16 } 17 response, err := conn.DoRequest(ctx, nil, http.MethodGet, "/info", nil, nil) 18 if err != nil { 19 return nil, err 20 } 21 defer response.Body.Close() 22 23 info := define.Info{} 24 return &info, response.Process(&info) 25 }