regProxy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EndPoints []string `json:"endpoints"`
	Timeout   time.Duration
	Secure    bool
	Enable    bool // Whether to open the open plug-in
}

Config regConfig

func DefaultConfig

func DefaultConfig() Config

DefaultConfig return default config

func StdConfig

func StdConfig(key string) Config

StdConfig returns standard configuration information

type RegProxy

type RegProxy struct {
	pb.KVServer
	pb.LeaseServer
	pb.WatchServer

	*etcdv3.Client
	// contains filtered or unexported fields
}

RegProxy ...

func NewRegProxy

func NewRegProxy(registryClient *etcdv3.Client) *RegProxy

NewRegProxy ...

func (*RegProxy) C

func (proxy *RegProxy) C() <-chan *structs.ServiceNode

C ...

func (*RegProxy) Close

func (proxy *RegProxy) Close()

Close ...

func (*RegProxy) LoadServiceConfiguration

func (proxy *RegProxy) LoadServiceConfiguration(appName string) (*structs.AppConfiguration, bool)

LoadServiceConfiguration ...

func (*RegProxy) Put

func (proxy *RegProxy) Put(ctx context.Context, in *pb.PutRequest) (out *pb.PutResponse, err error)

Put Intercept the service registration request, register and rewrite the registration information

func (*RegProxy) SayHello

func (proxy *RegProxy) SayHello(ctx context.Context, request *helloworld.HelloRequest) (*helloworld.HelloReply, error)

SayHello ...

func (*RegProxy) Start

func (proxy *RegProxy) Start() error

Start ...

func (*RegProxy) StoreServiceConfiguration

func (proxy *RegProxy) StoreServiceConfiguration(key string, conf *structs.AppConfiguration)

StoreServiceConfiguration ...

Jump to

Keyboard shortcuts

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