Documentation
¶
Overview ¶
-------------------------------------------------------------------------
* * polardb_pg_service.go * polardb pg metric service for cluster manager * * * 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/service/polardb_pg_service.go *-------------------------------------------------------------------------
Index ¶
- Constants
- type CollectRequest
- type CollectResponse
- type PolarDBPgService
- func (s *PolarDBPgService) Get(k string) (map[string]interface{}, error)
- func (s *PolarDBPgService) ResponseError(rsp http.ResponseWriter, err error)
- func (s *PolarDBPgService) ServeHTTP(rsp http.ResponseWriter, req *http.Request)
- func (s *PolarDBPgService) Set(k string, v map[string]interface{}) error
- func (s *PolarDBPgService) Start() error
- func (s *PolarDBPgService) Stop() error
Constants ¶
View Source
const KEY_SEND_TO_MULTIBACKEND = "send_to_multibackend"
View Source
const (
RESPONSE_OK = "{\"code\":200}"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectRequest ¶
type CollectRequest struct {
InsID string `json:"ins_id"`
}
type CollectResponse ¶
type PolarDBPgService ¶
type PolarDBPgService struct { Port string Metrics map[string]map[string]interface{} Lock sync.Mutex Server *http.Server }
func GetPolarDBPgService ¶
func GetPolarDBPgService() *PolarDBPgService
func (*PolarDBPgService) Get ¶
func (s *PolarDBPgService) Get(k string) (map[string]interface{}, error)
func (*PolarDBPgService) ResponseError ¶
func (s *PolarDBPgService) ResponseError(rsp http.ResponseWriter, err error)
func (*PolarDBPgService) ServeHTTP ¶
func (s *PolarDBPgService) ServeHTTP(rsp http.ResponseWriter, req *http.Request)
func (*PolarDBPgService) Set ¶
func (s *PolarDBPgService) Set(k string, v map[string]interface{}) error
func (*PolarDBPgService) Start ¶
func (s *PolarDBPgService) Start() error
func (*PolarDBPgService) Stop ¶
func (s *PolarDBPgService) Stop() error
Click to show internal directories.
Click to hide internal directories.