service

package
v0.0.0-...-d050cfb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0, Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App 单个服务信息

type Apps

type Apps struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Apps 所有app服务信息

type Collector

type Collector struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Collector 采集服务

func New

func New(l *zap.Logger) *Collector

New new collecotr

func (*Collector) Close

func (c *Collector) Close() error

Close 关闭collector

func (*Collector) Start

func (c *Collector) Start() error

Start 启动collector

type DubboAPIMap

type DubboAPIMap struct {
	sync.RWMutex
	APIs map[string]string
}

DubboAPIMap ...

func NewDubboAPIMap

func NewDubboAPIMap() *DubboAPIMap

NewDubboAPIMap ...

func (*DubboAPIMap) Add

func (d *DubboAPIMap) Add(api, appName string)

Add ...

func (*DubboAPIMap) Get

func (d *DubboAPIMap) Get(api string) (string, bool)

Get ...

type Etcd

type Etcd struct {
	Client      *clientv3.Client
	Grant       *clientv3.LeaseGrantResponse
	ReportKey   string
	ReportValue string
	StopC       chan bool
}

Etcd struct,report udp listen addr

func (*Etcd) Close

func (e *Etcd) Close()

Close stop ereport

func (*Etcd) Get

func (e *Etcd) Get()

Get Get

func (*Etcd) Init

func (e *Etcd) Init(addrs []string, reportKey, reportValue string) error

Init init Etcd

func (*Etcd) Put

func (e *Etcd) Put(key, value string, ttl int64) error

Put put

func (*Etcd) Start

func (e *Etcd) Start() error

Start start report thread

type OrderlyKeys

type OrderlyKeys []int64

OrderlyKeys 排序工具

func (OrderlyKeys) Len

func (o OrderlyKeys) Len() int

Len OrderlyKey 长度

func (OrderlyKeys) Less

func (o OrderlyKeys) Less(i, j int) bool

Less 对比

func (OrderlyKeys) Swap

func (o OrderlyKeys) Swap(i, j int)

Swap 交换

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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