MCPcopy Create free account
hub / github.com/ByteYellow/AgentProvenance / controlSvc

Function controlSvc

internal/cli/root.go:86–101  ·  view source on GitHub ↗
(dataDir string)

Source from the content-addressed store, hash-verified

84}
85
86func controlSvc(dataDir string) (control.Service, func(), error) {
87 paths, err := store.Init(dataDir)
88 if err != nil {
89 return control.Service{}, nil, err
90 }
91 db, err := store.Open(paths)
92 if err != nil {
93 return control.Service{}, nil, err
94 }
95 driver, err := runtimeplane.NewDriver("docker", paths)
96 if err != nil {
97 db.Close()
98 return control.Service{}, nil, err
99 }
100 return control.Service{DB: db, Paths: paths, Driver: driver}, func() { db.Close() }, nil
101}
102
103func short(value string) string {
104 if len(value) <= 12 {

Callers 4

execCmdFunction · 0.85
snapshotCmdFunction · 0.85
sessionCmdFunction · 0.85
processCmdFunction · 0.85

Calls 3

InitFunction · 0.92
OpenFunction · 0.92
CloseMethod · 0.45

Tested by

no test coverage detected