Documentation
¶
Index ¶
- Constants
- Variables
- func Get(req GetRequest)
- func GetLainConf(key string) ([]byte, error)
- func Patch(req PatchRequest)
- func Start()
- type AppProcs
- type AuthConfInfo
- type GetRequest
- type GetResponse
- type GetType
- type InstanceModel
- type InstanceView
- type InstanceViewSorter
- type MySQLMonitor
- type PatchAction
- type PatchRequest
- type PatchResponse
- type ProcInstance
Constants ¶
View Source
const ( ActionActive PatchAction = "active" ActionDetach PatchAction = "detach" ActionPause PatchAction = "pause" ActionRegisterMaster PatchAction = "master" ActionRegisterStandby PatchAction = "standby" ActionRegisterSlave PatchAction = "slave" ActionResume PatchAction = "resume" ActionSwtich PatchAction = "switch" ActionUnregister PatchAction = "unregister" GetAllOverview GetType = "overview" GetOneDetails GetType = "detail" )
View Source
const ( MonitorPort = "6033" MonitorLocation = "/servers" )
View Source
const (
CooldownTime = 3 * time.Second
)
Variables ¶
View Source
var ( ConsoleAuthURL = fmt.Sprintf("http://console.%s/api/v1/repos/%s/roles/", lainDomain, lainAppName) SecretConf = getSecretConf() )
Functions ¶
func GetLainConf ¶
func Patch ¶
func Patch(req PatchRequest)
Patch receives a PatchRequest and sends to monitor to handle
Types ¶
type AppProcs ¶
type AppProcs struct {
Procs []ProcInstance `json:"proc"`
}
type AuthConfInfo ¶
type AuthConfInfo struct {
Type string `json:"type"`
}
type GetRequest ¶
type GetRequest struct {
RequestType GetType
Params map[string]string
ResponseChan chan GetResponse
}
type GetResponse ¶
type InstanceModel ¶
type InstanceModel struct {
Role string
Addr string
Port string
InstanceStatus msops.InstanceStatus
ReplicationStatus msops.ReplicationStatus
}
type InstanceView ¶
type InstanceViewSorter ¶
type InstanceViewSorter []InstanceView
func (InstanceViewSorter) Len ¶
func (svs InstanceViewSorter) Len() int
func (InstanceViewSorter) Less ¶
func (svs InstanceViewSorter) Less(i, j int) bool
func (InstanceViewSorter) Swap ¶
func (svs InstanceViewSorter) Swap(i, j int)
type MySQLMonitor ¶
type MySQLMonitor struct {
// contains filtered or unexported fields
}
func (MySQLMonitor) ServeHTTP ¶
func (monitor MySQLMonitor) ServeHTTP(rw http.ResponseWriter, req *http.Request)
ServeHTTP sends a singal to monitor sending init event to the new proxy
type PatchAction ¶
type PatchAction string
type PatchRequest ¶
type PatchRequest struct {
Action PatchAction
Endpoint string
ResponseChan chan PatchResponse
}
type PatchResponse ¶
type ProcInstance ¶
Click to show internal directories.
Click to hide internal directories.