forked from cloudfoundry/bosh-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
agent_client_interface.go
37 lines (31 loc) · 1 KB
/
agent_client_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package agentclient
import "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
//go:generate mockgen -source=agent_client_interface.go -package=mocks -destination=mocks/mocks.go -imports=.=github.com/cloudfoundry/bosh-agent/agentclient
type AgentClient interface {
Ping() (string, error)
Stop() error
Apply(applyspec.ApplySpec) error
Start() error
GetState() (AgentState, error)
MountDisk(string) error
UnmountDisk(string) error
ListDisk() ([]string, error)
MigrateDisk() error
CompilePackage(packageSource BlobRef, compiledPackageDependencies []BlobRef) (compiledPackageRef BlobRef, err error)
DeleteARPEntries(ips []string) error
SyncDNS(blobID, sha1 string, version uint64) (string, error)
RunScript(scriptName string, options map[string]interface{}) error
}
type AgentState struct {
JobState string
NetworkSpecs map[string]NetworkSpec
}
type NetworkSpec struct {
IP string `json:"ip"`
}
type BlobRef struct {
Name string
Version string
BlobstoreID string
SHA1 string
}