MCPcopy
hub / github.com/baetyl/baetyl / AMI

Interface AMI

ami/ami.go:45–72  ·  view source on GitHub ↗

AMI app model interfaces

Source from the content-addressed store, hash-verified

43
44// AMI app model interfaces
45type AMI interface {
46 // node
47 CollectNodeInfo() (map[string]interface{}, error)
48 CollectNodeStats() (map[string]interface{}, error)
49 GetModeInfo() (interface{}, error)
50
51 // app
52 ApplyApp(string, specv1.Application, map[string]specv1.Configuration, map[string]specv1.Secret) error
53 DeleteApp(string, string) error
54 StatsApps(string) ([]specv1.AppStats, error)
55
56 // TODO: update
57 FetchLog(namespace, service string, tailLines, sinceSeconds int64) (io.ReadCloser, error)
58
59 // RemoteCommand remote debug
60 RemoteCommand(option *DebugOptions, pipe Pipe) error
61
62 // RemoteWebsocket remote link
63 RemoteWebsocket(ctx context.Context, option *DebugOptions, pipe Pipe) error
64
65 // RemoteLogs remote logs
66 RemoteLogs(option *LogsOptions, pipe Pipe) error
67
68 UpdateNodeLabels(string, map[string]string) error
69
70 // RPCApp call baetyl app from baetyl-core
71 RPCApp(url string, req *specv1.RPCRequest) (*specv1.RPCResponse, error)
72}
73
74type DebugOptions struct {
75 KubeDebugOptions

Callers 49

CollectMethod · 0.65
TestCollectFunction · 0.65
TestReportAndApplyFunction · 0.65
TestCollectNodeInfoFunction · 0.65
TestActivate_Err_AmiFunction · 0.65
collectMethod · 0.65
TestActivateFunction · 0.65
CollectMethod · 0.65
TestCollectFunction · 0.65
TestReportAndApplyFunction · 0.65
CollectMethod · 0.65

Implementers 4

nativeImplami/native/native.go
kubeImplami/kube/kube.go
MockAMImock/ami.go

Calls

no outgoing calls

Tested by

no test coverage detected