Documentation ¶
Index ¶
- Constants
- Variables
- func FindValidServiceUrl(ctx context.Context, service Service, proxyEndpointId string, info sServerInfo, ...) (string, error)
- func GenerateTelegrafConf(serverDetails *api.ServerDetails, influxdbUrl, osType, hypervisor string) (string, error)
- func GetArgGenerator(name string) (argGenerator, bool)
- func GetArgs(ctx context.Context, serverId, proxyEndpointId string, others interface{}) (map[string]interface{}, error)
- func GetCleanFunc(session *mcclient.ClientSession, hypervisor, serverId, host, forward string, ...) func() error
- func GetLocalArgs(serverDetails *comapi.ServerDetails, influxdbUrl string) map[string]interface{}
- func GetServerInfo(ctx context.Context, serverId string) (sServerInfo, error)
- func GetServiceUrl(ctx context.Context, serviceName string) (string, error)
- func GetValFromMap(valMap map[string]string, key string) string
- func RegisterArgGenerator(name string, ag argGenerator)
- type SSHable
- type SServerInfo
- type Service
Constants ¶
View Source
const TELEGRAF_CONF_TEMPLETE = `` /* 1246-byte string literal not displayed */
copy from: https://github.com/yunionio/ansible-telegraf/blob/master/templates/telegraf.conf.j2
View Source
const TELEGRAF_INPUT_BAREMETAL = `` /* 822-byte string literal not displayed */
View Source
const TELEGRAF_INPUT_LINUX = `` /* 809-byte string literal not displayed */
View Source
const TELEGRAF_INPUT_WINDOWS = `` /* 712-byte string literal not displayed */
Variables ¶
View Source
var ErrCannotReachInfluxbd = errors.Error("no suitable network to reach influxdb")
View Source
var ErrServerNotSshable = errors.Error("server is not sshable")
Functions ¶
func FindValidServiceUrl ¶
func FindValidServiceUrl(ctx context.Context, service Service, proxyEndpointId string, info sServerInfo, host *ansible_api.AnsibleHost) (string, error)
func GenerateTelegrafConf ¶
func GenerateTelegrafConf( serverDetails *api.ServerDetails, influxdbUrl, osType, hypervisor string, ) (string, error)
func GetArgGenerator ¶
func GetCleanFunc ¶
func GetCleanFunc(session *mcclient.ClientSession, hypervisor, serverId, host, forward string, port int) func() error
func GetLocalArgs ¶
func GetLocalArgs(serverDetails *comapi.ServerDetails, influxdbUrl string) map[string]interface{}
func RegisterArgGenerator ¶
func RegisterArgGenerator(name string, ag argGenerator)
Types ¶
type SSHable ¶
type SSHable struct { Ok bool Reason string User string Host string Port int Password string ServerName string ServerHypervisor string OsType string ProxyEndpointId string ProxyAgentId string ProxyForwardId string }
func CheckSSHable ¶
func CheckSshableForYunionCloud ¶
func CheckSshableForYunionCloud(session *mcclient.ClientSession, serverInfo SServerInfo) (sshable SSHable, cleanFunc func() error, err error)
Click to show internal directories.
Click to hide internal directories.