github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/moby/api/server/router/system/backend.go (about) 1 package system // import "github.com/docker/docker/api/server/router/system" 2 3 import ( 4 "context" 5 "time" 6 7 "github.com/docker/docker/api/types" 8 "github.com/docker/docker/api/types/events" 9 "github.com/docker/docker/api/types/filters" 10 "github.com/docker/docker/api/types/swarm" 11 ) 12 13 // Backend is the methods that need to be implemented to provide 14 // system specific functionality. 15 type Backend interface { 16 SystemInfo() *types.Info 17 SystemVersion() types.Version 18 SystemDiskUsage(ctx context.Context) (*types.DiskUsage, error) 19 SubscribeToEvents(since, until time.Time, ef filters.Args) ([]events.Message, chan interface{}) 20 UnsubscribeFromEvents(chan interface{}) 21 AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error) 22 } 23 24 // ClusterBackend is all the methods that need to be implemented 25 // to provide cluster system specific functionality. 26 type ClusterBackend interface { 27 Info() swarm.Info 28 }