storegw

package
v0.0.0-...-faa1211 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package storegw xxx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStoreSvr

func GetStoreSvr(logger log.Logger, reg *prometheus.Registry, conf *config.StoreConf) (storepb.StoreServer, error)

GetStoreSvr 工厂模式

Types

type Group

type Group struct {
	targetgroup.Group
}

Group 兼容 targetgroup.Group, 老版本没有MarshalJSON, 按最新版本 参考 https://github.com/prometheus/prometheus/blob/v2.36.2/discovery/targetgroup/targetgroup.go#L96

func (Group) MarshalJSON

func (tg Group) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

type NilLogger

type NilLogger struct{}

NilLogger grpc log, 不打印无效日志

func (*NilLogger) Log

func (l *NilLogger) Log(keyvals ...interface{}) error

Log :

type PortRange

type PortRange struct {
	Start int64
	End   int64
}

PortRange grpc端口范围

func NewPortRange

func NewPortRange(matchString string) (*PortRange, error)

NewPortRange 解析portRange

func (*PortRange) AllocatePort

func (p *PortRange) AllocatePort(idx int64) (int64, error)

AllocatePort 动态选择一个合适的端口

type Store

type Store struct {
	*config.StoreConf
	Address string
	Server  *grpcserver.Server
	// contains filtered or unexported fields
}

Store GW Store 基类

func NewStore

func NewStore(ctx context.Context, logger log.Logger, reg *prometheus.Registry, address string, conf *config.StoreConf,
	storeSvr storepb.StoreServer) (*Store, error)

NewStore :

func (*Store) ListenAndServe

func (s *Store) ListenAndServe() error

ListenAndServe 启动服务

func (*Store) Shutdown

func (s *Store) Shutdown(err error)

Shutdown 关闭服务

type StoreFactory

type StoreFactory func(logger log.Logger, reg *prometheus.Registry, conf *config.StoreConf) (storepb.StoreServer, error)

StoreFactory 工厂模式

type StoreGW

type StoreGW struct {
	GRPCAdvertiseIP string
	// contains filtered or unexported fields
}

StoreGW Store 管理结构

func NewStoreGW

func NewStoreGW(ctx context.Context, logger log.Logger, reg *prometheus.Registry, grpcAdvertiseIP string,
	grpcAdvertisePortRangeStr string, confs []*config.StoreConf, storeFunc StoreFactory) (*StoreGW, error)

NewStoreGW :

func (*StoreGW) GetStoreAddrs

func (s *StoreGW) GetStoreAddrs() []string

GetStoreAddrs 本地 store 地址

func (*StoreGW) Run

func (s *StoreGW) Run() error

Run 启动服务

func (*StoreGW) Shutdown

func (s *StoreGW) Shutdown(err error)

Shutdown xxx

func (*StoreGW) TargetGroups

func (s *StoreGW) TargetGroups() []*Group

TargetGroups 返回标准的targets

Directories

Path Synopsis
Package bcssystem bcs system
Package bcssystem bcs system
source
Package source client
Package source client
source/base
Package base xxx
Package base xxx
source/bk_monitor
Package bkmonitor bk monitor
Package bkmonitor bk monitor
source/compute
Package compute cluster operate
Package compute cluster operate
source/computev2
Package computev2 cluster operate
Package computev2 cluster operate
source/federation
Package federation Factory
Package federation Factory
source/prometheus
Package prometheus prometheus
Package prometheus prometheus
source/vcluster
Package vcluster cluster operate
Package vcluster cluster operate
Package bkmonitor bk monitor
Package bkmonitor bk monitor
Package clientutil xxx
Package clientutil xxx
Package prometheus ...
Package prometheus ...
Package staticmetrics ...
Package staticmetrics ...
Package suanlicpu implements the store node API on top of the Prometheus remote read API.
Package suanlicpu implements the store node API on top of the Prometheus remote read API.
Package suanligpunative implements the store node API on top of the Prometheus remote read API.
Package suanligpunative implements the store node API on top of the Prometheus remote read API.

Jump to

Keyboard shortcuts

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