Documentation ¶
Overview ¶
-------------------------------------------------------------------------
* * environment_collector.go * environment collector interface and base class * * * 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 * plugins/polardb_pg_opensource/environment/environment_collector.go *-------------------------------------------------------------------------
-------------------------------------------------------------------------
* * environment_factory.go * environment collector factory * * * 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 * plugins/polardb_pg_opensource/environment/environment_factory.go *-------------------------------------------------------------------------
-------------------------------------------------------------------------
* * polarflex_collector.go * polarflex environment collector * * * 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 * plugins/polardb_pg_opensource/environment/polarflex_collector.go *-------------------------------------------------------------------------
Index ¶
- Constants
- type EnvironmentCollectorBase
- func (c *EnvironmentCollectorBase) BuildMultiBackendOutDict(out map[string]interface{}, keys ...string)
- func (c *EnvironmentCollectorBase) BuildOutDictSendToMultiBackend(out map[string]interface{}, keys ...string) error
- func (c *EnvironmentCollectorBase) Collect(out map[string]interface{}) error
- func (c *EnvironmentCollectorBase) Init(m map[string]interface{}, logger *log.PluginLogger) error
- func (c *EnvironmentCollectorBase) RegistCollecFunc(function func(map[string]interface{}) error)
- func (c *EnvironmentCollectorBase) Stop() error
- type EnvironmentCollectorInterface
- type PolarFlexEnvironmentCollector
Constants ¶
View Source
const (
DefaultLocalDiskCollectInterval = 15
)
View Source
const (
KEY_SEND_TO_MULTIBACKEND = "send_to_multibackend"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvironmentCollectorBase ¶
type EnvironmentCollectorBase struct { Collectors map[string]EnvironmentCollectorInterface Collectfuncs []func(map[string]interface{}) error DefaultOut map[string]interface{} // contains filtered or unexported fields }
func NewEnvironmentCollectorBase ¶
func NewEnvironmentCollectorBase() EnvironmentCollectorBase
func (*EnvironmentCollectorBase) BuildMultiBackendOutDict ¶
func (c *EnvironmentCollectorBase) BuildMultiBackendOutDict(out map[string]interface{}, keys ...string)
func (*EnvironmentCollectorBase) BuildOutDictSendToMultiBackend ¶
func (c *EnvironmentCollectorBase) BuildOutDictSendToMultiBackend( out map[string]interface{}, keys ...string) error
func (*EnvironmentCollectorBase) Collect ¶
func (c *EnvironmentCollectorBase) Collect(out map[string]interface{}) error
func (*EnvironmentCollectorBase) Init ¶
func (c *EnvironmentCollectorBase) Init(m map[string]interface{}, logger *log.PluginLogger) error
func (*EnvironmentCollectorBase) RegistCollecFunc ¶
func (c *EnvironmentCollectorBase) RegistCollecFunc(function func(map[string]interface{}) error)
func (*EnvironmentCollectorBase) Stop ¶
func (c *EnvironmentCollectorBase) Stop() error
type EnvironmentCollectorInterface ¶
type EnvironmentCollectorInterface interface { Init(m map[string]interface{}, logger *log.PluginLogger) error Collect(out map[string]interface{}) error Stop() error }
func CreateEnvironmentCollector ¶
func CreateEnvironmentCollector(m map[string]interface{}, logger *log.PluginLogger) EnvironmentCollectorInterface
type PolarFlexEnvironmentCollector ¶
type PolarFlexEnvironmentCollector struct { EnvironmentCollectorBase Port int Envs map[string]string // contains filtered or unexported fields }
func NewPolarFlexEnvironmentCollector ¶
func NewPolarFlexEnvironmentCollector() *PolarFlexEnvironmentCollector
func (*PolarFlexEnvironmentCollector) Init ¶
func (c *PolarFlexEnvironmentCollector) Init(m map[string]interface{}, logger *log.PluginLogger) error
Click to show internal directories.
Click to hide internal directories.