statistics

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

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.

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.

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

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 struct {
	Resources []struct {
		Metadata struct {
			Guid string `json:"guid"`
		} `json:"metadata"`
	} `json:"resources"`
}

type Statistics

type Statistics struct {
	Instances []string
	Data      map[string]Instance
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL