router

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyKibana is meta service name of kibana
	KeyKibana = "kibana"

	// AppKibanaNoProfilePath is path to register when server returned no profile
	AppKibanaNoProfilePath = "api/kibana_no_profile"
)
View Source
const (
	AppSecretHeaderName      = "X-App-Secret"
	AppGroupSecretHeaderName = "X-App-Group-Secret"
	AppNameHeaderName        = "X-App-Name"
	KeyProducer              = "producer"
	AppNoProfilePath         = "api/producer_no_profile"
	AppNoSecretPath          = "api/no_secret"
)
View Source
const ConsulServiceBackupCachePrefix = "consul_backup_cache_"
View Source
const ProfileBackupCachePrefix = "profile_backup_cache_"

Variables

This section is empty.

Functions

func ConvertBytesToTimber added in v0.6.0

func ConvertBytesToTimber(b []byte, context pb.TimberContext) (timber pb.Timber, err error)

func ConvertBytesToTimberCollection added in v0.6.0

func ConvertBytesToTimberCollection(b []byte, context pb.TimberContext) (timberCol pb.TimberCollection, err error)

func KibanaGetClustername added in v0.2.1

func KibanaGetClustername(req *http.Request) string

func TimberContextFromProfile added in v0.6.0

func TimberContextFromProfile(profile *Profile) pb.TimberContext

Types

type ConsulCatalog added in v0.6.5

type ConsulCatalog interface {
	Service(service, tag string, q *api.QueryOptions) ([]*api.CatalogService, *api.QueryMeta, error)
}

type ElasticsearchMeta added in v0.3.0

type ElasticsearchMeta struct {
	IndexPrefix  string `json:"index_prefix"`
	DocumentType string `json:"document_type"`
}

type KafkaMeta added in v0.3.0

type KafkaMeta struct {
	TopicName         string `json:"topic_name"`
	Partition         int32  `json:"partition"`
	ReplicationFactor int16  `json:"replication_factor"`
	ConsumerGroup     string `json:"consumer_group"`
}

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, accessToken, profilePath, authorizePath, casAddr string, appCtx *appcontext.AppContext) KibanaRouter

NewKibanaRouter is a function for creating new kibana router

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, appCtx *appcontext.AppContext) ProducerRouter

type ProducerStore added in v0.6.0

type ProducerStore struct {
	// contains filtered or unexported fields
}

func NewProducerStore added in v0.6.0

func NewProducerStore() *ProducerStore

func (*ProducerStore) CloseConns added in v0.6.0

func (s *ProducerStore) CloseConns()

func (*ProducerStore) GetClient added in v0.6.0

func (s *ProducerStore) GetClient(attr producerAttributes) pb.ProducerClient

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"`
	ConsulHosts     []string    `json:"consul_hosts"`
	ProducerAddress string      `json:"producer_address"`
	KibanaAddress   string      `json:"kibana_address"`
	AppStatus       string      `json:"status"`
	Meta            ProfileMeta `json:"meta"`
}

func NewProfileFromBytes

func NewProfileFromBytes(b []byte) (*Profile, error)

func (Profile) MetaServiceName added in v0.2.0

func (p Profile) MetaServiceName(name string) (val string, ok bool)

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL