regProxy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 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 {
	Enable     bool // Whether to open the open plug-in
	Prometheus etcd.PluginRegProxyPrometheus
}

Config regConfig

func DefaultConfig

func DefaultConfig() Config

DefaultConfig return default config

func StdConfig

func StdConfig(key string) *Config

StdConfig returns standard configuration information

func (*Config) Build added in v0.1.0

func (c *Config) Build() *RegProxy

Build new the instance

type RegProxy

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

	*etcdv3.Client

	helloworld.GreeterServer
	// contains filtered or unexported fields
}

RegProxy ...

func NewRegProxy

func NewRegProxy(confClient *etcd.DataSource) *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 ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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