Documentation
¶
Overview ¶
-------------------------------------------------------------------------
* * command_executor.go * command line executor * * * Copyright (c) 2021, Alibaba Group Holding Limited * 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. * * IDENTIFICATION * common/polardb_pg/utils/command_executor.go *-------------------------------------------------------------------------
-------------------------------------------------------------------------
* * delta_calculator.go * delta metric calculator * * * Copyright (c) 2021, Alibaba Group Holding Limited * 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. * * IDENTIFICATION * common/polardb_pg/utils/delta_calculator.go *-------------------------------------------------------------------------
-------------------------------------------------------------------------
* * disk_usage_collector.go * async disk usage collect wrapper * * * Copyright (c) 2021, Alibaba Group Holding Limited * 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. * * IDENTIFICATION * common/polardb_pg/utils/disk_usage_collector.go *-------------------------------------------------------------------------
-------------------------------------------------------------------------
* * ssh_client.go * SSH client * * * Copyright (c) 2021, Alibaba Group Holding Limited * 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. * * IDENTIFICATION * common/polardb_pg/utils/ssh_client.go *-------------------------------------------------------------------------
Index ¶
- Constants
- func PublicKeyFile(file string) ssh.AuthMethod
- type CommandExecutor
- type DeltaCalculator
- func (c *DeltaCalculator) CalDeltaData(deltaname string, out map[string]interface{}, value float64)
- func (c *DeltaCalculator) CalRateData(deltaname string, out map[string]interface{}, value float64)
- func (c *DeltaCalculator) CalRateDataWithNano(deltaname string, out map[string]interface{}, value float64)
- func (c *DeltaCalculator) Init() error
- func (c *DeltaCalculator) Stop() error
- type DiskUsageCollector
- type ImportedCollector
- type PreValue
- type SSHClient
Constants ¶
View Source
const ( SSHPort = 22 PublicKeyFileName = "/root/.ssh/id_rsa" Password = "12345678" )
Variables ¶
This section is empty.
Functions ¶
func PublicKeyFile ¶
func PublicKeyFile(file string) ssh.AuthMethod
Types ¶
type CommandExecutor ¶
type CommandExecutor struct { }
func NewCommandExecutor ¶
func NewCommandExecutor() *CommandExecutor
func (*CommandExecutor) Close ¶
func (c *CommandExecutor) Close() error
func (*CommandExecutor) ExecCommand ¶
func (c *CommandExecutor) ExecCommand(cmd string) (string, error)
func (*CommandExecutor) Init ¶
func (c *CommandExecutor) Init() error
type DeltaCalculator ¶
type DeltaCalculator struct {
// contains filtered or unexported fields
}
func NewDeltaCalculator ¶
func NewDeltaCalculator() *DeltaCalculator
func (*DeltaCalculator) CalDeltaData ¶
func (c *DeltaCalculator) CalDeltaData(deltaname string, out map[string]interface{}, value float64)
func (*DeltaCalculator) CalRateData ¶
func (c *DeltaCalculator) CalRateData(deltaname string, out map[string]interface{}, value float64)
func (*DeltaCalculator) CalRateDataWithNano ¶
func (c *DeltaCalculator) CalRateDataWithNano(deltaname string, out map[string]interface{}, value float64)
func (*DeltaCalculator) Init ¶
func (c *DeltaCalculator) Init() error
func (*DeltaCalculator) Stop ¶
func (c *DeltaCalculator) Stop() error
type DiskUsageCollector ¶
type DiskUsageCollector struct {
// contains filtered or unexported fields
}
func NewDiskUsageCollector ¶
func NewDiskUsageCollector() *DiskUsageCollector
func (*DiskUsageCollector) Close ¶
func (c *DiskUsageCollector) Close() error
func (*DiskUsageCollector) Collect ¶
func (c *DiskUsageCollector) Collect(dirname string) (int64, error)
func (*DiskUsageCollector) Init ¶
func (c *DiskUsageCollector) Init(m map[string]interface{}) error
type ImportedCollector ¶
type ImportedCollector struct {
// contains filtered or unexported fields
}
type SSHClient ¶
type SSHClient struct {
// contains filtered or unexported fields
}
func NewSSHClient ¶
Click to show internal directories.
Click to hide internal directories.