Documentation ¶
Overview ¶
Copyright 2015 Swisscom (Schweiz) AG
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Swisscom (Schweiz) AG ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Swisscom (Schweiz) AG ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func Run(cliConnection plugin.CliConnection, args []string)
- type Instance
- type Search
- type Statistics
- type TerminalUI
- func (t *TerminalUI) AdjustCPU(stats Statistics)
- func (t *TerminalUI) AdjustDisk(stats Statistics)
- func (t *TerminalUI) AdjustMemory(stats Statistics)
- func (t *TerminalUI) AdjustSummary(stats Statistics)
- func (t *TerminalUI) Close()
- func (t *TerminalUI) Render()
- func (t *TerminalUI) Resize()
- func (t *TerminalUI) ScaleApp(appName string, instances int)
- func (t *TerminalUI) UpdateStatistics(stats Statistics)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(cliConnection plugin.CliConnection, args []string)
Types ¶
type Instance ¶
type Instance struct { State string `json:"state"` Stats struct { Name string `json:"name"` URIs []string `json:"uris"` Host string `json:"host"` Port int `json:"port"` Uptime int64 `json:"uptime"` MemoryQuota int64 `json:"mem_quota"` DiskQuota int64 `json:"disk_quota"` FiledescriptorQuota int `json:"fds_quota"` Usage struct { Time string `json:"time"` CPU float64 `json:"cpu"` Memory int64 `json:"mem"` Disk int64 `json:"disk"` } `json:"usage"` } `json:"stats"` }
type Search ¶
type Search struct { Resources []struct { Metadata struct { Guid string `json:"guid"` } `json:"metadata"` } `json:"resources"` }
type Statistics ¶
type TerminalUI ¶
type TerminalUI struct { Body *ui.Grid Usage *ui.Par Summary *ui.Par CPU *ui.Sparklines Memory []*ui.Gauge Disk *ui.BarChart }
func (*TerminalUI) AdjustCPU ¶
func (t *TerminalUI) AdjustCPU(stats Statistics)
func (*TerminalUI) AdjustDisk ¶
func (t *TerminalUI) AdjustDisk(stats Statistics)
func (*TerminalUI) AdjustMemory ¶
func (t *TerminalUI) AdjustMemory(stats Statistics)
func (*TerminalUI) AdjustSummary ¶
func (t *TerminalUI) AdjustSummary(stats Statistics)
func (*TerminalUI) Close ¶
func (t *TerminalUI) Close()
func (*TerminalUI) Render ¶
func (t *TerminalUI) Render()
func (*TerminalUI) Resize ¶
func (t *TerminalUI) Resize()
func (*TerminalUI) ScaleApp ¶
func (t *TerminalUI) ScaleApp(appName string, instances int)
func (*TerminalUI) UpdateStatistics ¶
func (t *TerminalUI) UpdateStatistics(stats Statistics)