func (r *Registry) RequestProgress(ctx context.Context) error {
	return r.client.RequestProgress(ctx)
}
RequestProgress inwrap for clientv3.RequestProgress of etcd
package service
import (
	"context"
	"errors"
	"fmt"
	"strings"
	"time"
	"github.com/axfor/bast/conf"
	"github.com/axfor/bast/logs"
	"go.etcd.io/etcd/clientv3"
)
type Registry struct {
	client       *clientv3.Client
	leaseID      clientv3.LeaseID
	prefix       string
	postfix      string
	stop         chan struct{}
	keepAliveing bool
}
func NewRegistry(c *conf.RegistryConf) (*Registry, error) {
	if c.DialTimeout <= 0 {
		c.DialTimeout = 10
	}
	if c.TTL <= 0 {
		c.TTL = 5
	}
	cli, err := clientv3.New(clientv3.Config{
		Endpoints:   strings.Split(c.Endpoints, ","),
		DialTimeout: time.Duration(c.DialTimeout) * time.Second,
	})
	if err != nil {
		return nil, err
	}
	resp, err := cli.Grant(cli.Ctx(), c.TTL)
	if err != nil {
		return nil, err
	}
	r := &Registry{
		client:  cli,
		leaseID: resp.ID,
		prefix:  c.Prefix,
		postfix: fmt.Sprintf(".%d", resp.ID),
	}
	return r, nil
}
func (r *Registry) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) {
	if r.client == nil {
		return nil, errors.New("registry etcd client is nil")
	}
	key = r.prefix + key + r.postfix
	return r.client.Put(ctx, key, val, r.op(opts)...)
}
func (r *Registry) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) {
	if r.client == nil {
		return nil, errors.New("registry etcd client is nil")
	}
	key = r.prefix + key + r.postfix
	return r.client.Get(ctx, key, r.op(opts)...)
}
func (r *Registry) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error) {
	if r.client == nil {
		return nil, errors.New("registry etcd client is nil")
	}
	key = r.prefix + key + r.postfix
	return r.client.Delete(ctx, key, r.op(opts)...)
}
func (r *Registry) Compact(ctx context.Context, rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error) {
	if r.client == nil {
		return nil, errors.New("registry etcd client is nil")
	}
	return r.client.Compact(ctx, rev, opts...)
}
func (r *Registry) Do(ctx context.Context, op clientv3.Op) (clientv3.OpResponse, error) {
	if r.client == nil {
		return clientv3.OpResponse{}, errors.New("registry etcd client is nil")
	}
	return r.client.Do(ctx, op)
}
func (r *Registry) Txn(ctx context.Context) clientv3.Txn {
	if r.client == nil {
		return nil
	}
	return r.client.Txn(ctx)
}
func (r *Registry) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan {
	if r.client == nil {
		return nil
	}
	return r.client.Watch(ctx, key, r.op(opts)...)
}