nacos

package
v0.0.0-...-ebb33e4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNacos

func NewNacos(logger logger.Logger) bindings.OutputBinding

NewNacos returns a new Nacos instance.

Types

type Nacos

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

Nacos allows reading/writing to a Nacos server.

func (*Nacos) Close

func (n *Nacos) Close() error

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

func (*Nacos) GetComponentMetadata

func (n *Nacos) GetComponentMetadata() map[string]string

GetComponentMetadata returns the metadata of the component.

func (*Nacos) Init

func (n *Nacos) Init(_ context.Context, 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(ctx context.Context, handler bindings.Handler) 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"`
	MaxAge               int           `mapstructure:"maxAge"`
	MaxSize              int           `mapstructure:"maxSize"`
	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