2018-02-05 16:05:59 -05:00
|
|
|
package system // import "github.com/docker/docker/api/server/router/system"
|
2015-12-03 13:11:19 -05:00
|
|
|
|
|
|
|
import (
|
2016-04-11 14:52:34 -04:00
|
|
|
"time"
|
|
|
|
|
2016-09-06 14:46:37 -04:00
|
|
|
"github.com/docker/docker/api/types"
|
|
|
|
"github.com/docker/docker/api/types/events"
|
|
|
|
"github.com/docker/docker/api/types/filters"
|
2018-04-20 05:06:40 -04:00
|
|
|
"github.com/docker/docker/api/types/swarm"
|
2016-03-18 17:42:40 -04:00
|
|
|
"golang.org/x/net/context"
|
2015-12-03 13:11:19 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// Backend is the methods that need to be implemented to provide
|
|
|
|
// system specific functionality.
|
|
|
|
type Backend interface {
|
|
|
|
SystemInfo() (*types.Info, error)
|
|
|
|
SystemVersion() types.Version
|
2017-04-12 16:59:31 -04:00
|
|
|
SystemDiskUsage(ctx context.Context) (*types.DiskUsage, error)
|
2016-04-11 14:52:34 -04:00
|
|
|
SubscribeToEvents(since, until time.Time, ef filters.Args) ([]events.Message, chan interface{})
|
2015-12-03 13:11:19 -05:00
|
|
|
UnsubscribeFromEvents(chan interface{})
|
2016-03-18 17:42:40 -04:00
|
|
|
AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error)
|
2015-12-03 13:11:19 -05:00
|
|
|
}
|
2018-04-20 05:06:40 -04:00
|
|
|
|
|
|
|
// ClusterBackend is all the methods that need to be implemented
|
|
|
|
// to provide cluster system specific functionality.
|
|
|
|
type ClusterBackend interface {
|
|
|
|
Info() swarm.Info
|
|
|
|
}
|