Documentation ¶
Index ¶
Constants ¶
View Source
const ( AppSecretHeaderName = "X-App-Secret" AppGroupSecretHeaderName = "X-App-Group-Secret" AppNameHeaderName = "X-App-Name" KeyProducer = "producer" )
View Source
const (
KeyKibana = "kibana"
)
Variables ¶
This section is empty.
Functions ¶
func KibanaGetClustername ¶ added in v0.2.1
Types ¶
type ElasticsearchMeta ¶ added in v0.3.0
type KibanaProxy ¶ added in v0.3.0
type KibanaProxy interface { ReverseProxy() *reverseproxy.ReverseProxy KibanaProxyHandler() *KibanaProxyHandler }
func NewKibanaProxy ¶ added in v0.3.0
func NewKibanaProxy(source string, target string) KibanaProxy
type KibanaProxyHandler ¶ added in v0.3.0
type KibanaProxyHandler struct {
// contains filtered or unexported fields
}
func (KibanaProxyHandler) Director ¶ added in v0.3.0
func (h KibanaProxyHandler) Director(req *http.Request)
func (KibanaProxyHandler) ModifyResponse ¶ added in v0.3.0
func (h KibanaProxyHandler) ModifyResponse(res *http.Response) error
type KibanaRouter ¶ added in v0.2.1
type KibanaRouter interface { Server() *http.Server ServeHTTP(w http.ResponseWriter, req *http.Request) }
func NewKibanaRouter ¶ added in v0.0.2
func NewKibanaRouter(addr, marketUrl, profilePath, authorizePath, casAddr string) KibanaRouter
NewKibanaRouter
type ProducerProxyHandler ¶ added in v0.3.0
type ProducerProxyHandler interface { Director(req *http.Request) ErrorHandler(rw http.ResponseWriter, req *http.Request, err error) }
func NewProducerProxyHandler ¶ added in v0.3.0
func NewProducerProxyHandler(target *url.URL, profile Profile, appSecret string) ProducerProxyHandler
type ProducerRouter ¶ added in v0.2.1
type ProducerRouter interface { Server() *http.Server ServeHTTP(w http.ResponseWriter, req *http.Request) }
func NewProducerRouter ¶ added in v0.2.1
func NewProducerRouter(addr, marketUrl, profilePath string, profileByAppGroupPath string) ProducerRouter
type Profile ¶
type Profile struct { ID int `json:"id"` Name string `json:"name"` AppSecret string `json:"app_secret"` AppGroup string `json:"app_group_name"` MaxTps int `json:"max_tps"` ClusterName string `json:"cluster_name"` ConsulHost string `json:"consul_host"` AppStatus string `json:"status"` Meta ProfileMeta `json:"meta"` }
func NewProfileFromBytes ¶
type ProfileMeta ¶ added in v0.2.0
type ProfileMeta struct { ServiceNames map[string]string `json:"service_names"` Kafka KafkaMeta `json:"kafka"` Elasticsearch ElasticsearchMeta `json:"elasticsearch"` }
type TimberContext ¶ added in v0.3.0
type TimberContext struct { KafkaTopic string `json:"kafka_topic"` KafkaPartition int32 `json:"kafka_partition"` KafkaReplicationFactor int16 `json:"kafka_replication_factor"` ESIndexPrefix string `json:"es_index_prefix"` ESDocumentType string `json:"es_document_type"` AppMaxTPS int `json:"app_max_tps"` AppSecret string `json:"app_secret"` }
Click to show internal directories.
Click to hide internal directories.