Documentation ¶
Index ¶
- Constants
- func CreateJmxAccessConfFileContent(jmxUser string, accessPerm string) string
- func CreateJmxPasswdConfFileContent(jmxUser string, jmxPasswd string) string
- func CreateJmxRemoteAccessConfFile(jmxUser string, accessPerm string) *manage.ReplicaConfigFile
- func CreateJmxRemotePasswdConfFile(jmxUser string, jmxPasswd string) *manage.ReplicaConfigFile
- func CreateSysConfigFile(platform string, memberDNSName string) *manage.ReplicaConfigFile
- func GenServiceMemberHosts(cluster string, service string, replicas int64) string
- func GenServiceMemberHostsWithPort(cluster string, service string, replicas int64, port int64) string
- func GenServiceMemberURIs(cluster string, service string, replicas int64, port int64) string
- func GenStatelessServiceReplicaConfigs(platform string, cluster string, service string, replicas int) []*manage.ReplicaConfig
- func IsJmxAccessConfFile(filename string) bool
- func IsJmxPasswdConfFile(filename string) bool
- func MBToBytes(mb int64) int64
- func ReplaceJmxUserInAccessConfFile(content string, newUser string, oldUser string) string
Constants ¶
const ( // The system variables in the sys.conf file SYS_FILE_NAME = "sys.conf" BindAllIP = "0.0.0.0" JmxRemotePasswdConfFileName = "jmxremote.password" JmxRemoteAccessConfFileName = "jmxremote.access" JmxConfFileMode = 0400 // the default password is uuid for better security // every service will define its own jmx port JmxDefaultRemoteUser = "jmxuser" JmxReadOnlyAccess = "readonly" JmxReadWriteAccess = "readwrite" )
Variables ¶
This section is empty.
Functions ¶
func CreateJmxAccessConfFileContent ¶ added in v0.9.5
CreateJmxAccessConfFileContent returns the jmxremote.access file content
func CreateJmxPasswdConfFileContent ¶ added in v0.9.5
CreateJmxPasswdConfFileContent returns the jmxremote.password file content
func CreateJmxRemoteAccessConfFile ¶ added in v0.9.5
func CreateJmxRemoteAccessConfFile(jmxUser string, accessPerm string) *manage.ReplicaConfigFile
CreateJmxRemoteAccessConfFile creates the jmx remote access file.
func CreateJmxRemotePasswdConfFile ¶ added in v0.9.5
func CreateJmxRemotePasswdConfFile(jmxUser string, jmxPasswd string) *manage.ReplicaConfigFile
CreateJmxRemotePasswdConfFile creates the jmx remote password file.
func CreateSysConfigFile ¶
func CreateSysConfigFile(platform string, memberDNSName string) *manage.ReplicaConfigFile
CreateSysConfigFile creates the content for the sys.conf file. example:
PLATFORM=ecs SERVICE_MEMBER=mycas-0.cluster-firecamp.com
func GenServiceMemberHosts ¶ added in v0.9.5
GenServiceMemberHosts creates the hostname list of all service members, example: myzoo-0.t1-firecamp.com,myzoo-1.t1-firecamp.com Note: this currently works for the service that all members have a single name format, such as ZooKeeper, Kafka, etc. For service such as ElasticSearch, MongoDB, that has different name formats, this is not suitable.
func GenServiceMemberHostsWithPort ¶ added in v0.9.5
func GenServiceMemberHostsWithPort(cluster string, service string, replicas int64, port int64) string
GenServiceMemberHostsWithPort creates the hostname:port list of all service members, example: myzoo-0.t1-firecamp.com:2181,myzoo-1.t1-firecamp.com:2181 Note: this currently works for the service that all members have a single name format, such as ZooKeeper, Kafka, etc. For service such as ElasticSearch, MongoDB, that has different name formats, this is not suitable.
func GenServiceMemberURIs ¶ added in v0.9.5
GenServiceMemberURIs creates the list of URIs for all service members, example: http://myes-0.t1-firecamp.com:9200,http://myes-1.t1-firecamp.com:9200
func GenStatelessServiceReplicaConfigs ¶ added in v0.9.5
func GenStatelessServiceReplicaConfigs(platform string, cluster string, service string, replicas int) []*manage.ReplicaConfig
GenStatelessServiceReplicaConfigs generates the replica configs for the stateless service.
func IsJmxAccessConfFile ¶ added in v0.9.5
IsJmxAccessConfFile checks if the file is jmx access conf file
func IsJmxPasswdConfFile ¶ added in v0.9.5
IsJmxPasswdConfFile checks if the file is jmx password conf file
Types ¶
This section is empty.