nacos

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nacos

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

Nacos allows reading/writing to a Nacos server

func NewNacos

func NewNacos(logger logger.Logger) *Nacos

NewNacos returns a new Nacos instance

func (*Nacos) Close

func (n *Nacos) Close() error

Close implements cancel all listeners, see https://github.com/r-c-correa/components-contrib/issues/779

func (*Nacos) Init

func (n *Nacos) Init(metadata bindings.Metadata) error

Init implements InputBinding/OutputBinding's Init method

func (*Nacos) Invoke

Invoke implements OutputBinding's Invoke method

func (*Nacos) Operations

func (n *Nacos) Operations() []bindings.OperationKind

Operations implements OutputBinding's Operations method

func (*Nacos) Read

func (n *Nacos) Read(handler func(*bindings.ReadResponse) ([]byte, error)) error

Read implements InputBinding's Read method

type Settings

type Settings struct {
	NameServer           string        `mapstructure:"nameServer"`
	Endpoint             string        `mapstructure:"endpoint"`
	RegionID             string        `mapstructure:"region"`
	NamespaceID          string        `mapstructure:"namespace"`
	AccessKey            string        `mapstructure:"accessKey"`
	SecretKey            string        `mapstructure:"secretKey"`
	Timeout              time.Duration `mapstructure:"timeout"`
	CacheDir             string        `mapstructure:"cacheDir"`
	UpdateThreadNum      int           `mapstructure:"updateThreadNum"`
	NotLoadCacheAtStart  bool          `mapstructure:"notLoadCacheAtStart"`
	UpdateCacheWhenEmpty bool          `mapstructure:"updateCacheWhenEmpty"`
	Username             string        `mapstructure:"username"`
	Password             string        `mapstructure:"password"`
	LogDir               string        `mapstructure:"logDir"`
	RotateTime           string        `mapstructure:"rotateTime"`
	MaxAge               int           `mapstructure:"maxAge"`
	LogLevel             string        `mapstructure:"logLevel"`
	Config               string        `mapstructure:"config"`
	Watches              string        `mapstructure:"watches"`
}

func (*Settings) Decode

func (s *Settings) Decode(in interface{}) error

func (*Settings) Validate

func (s *Settings) Validate() error

Jump to

Keyboard shortcuts

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