Documentation
¶
Index ¶
- func NewNacos(logger logger.Logger) bindings.OutputBinding
- type Nacos
- func (n *Nacos) Close() error
- func (n *Nacos) GetComponentMetadata() map[string]string
- func (n *Nacos) Init(_ context.Context, metadata bindings.Metadata) error
- func (n *Nacos) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
- func (n *Nacos) Operations() []bindings.OperationKind
- func (n *Nacos) Read(ctx context.Context, handler bindings.Handler) error
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Nacos ¶
type Nacos struct {
// contains filtered or unexported fields
}
Nacos allows reading/writing to a Nacos server.
func (*Nacos) Close ¶
Close implements cancel all listeners, see https://github.com/dapr/components-contrib/issues/779
func (*Nacos) GetComponentMetadata ¶
GetComponentMetadata returns the metadata of the component.
func (*Nacos) Invoke ¶
func (n *Nacos) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
Invoke implements OutputBinding's Invoke method.
func (*Nacos) Operations ¶
func (n *Nacos) Operations() []bindings.OperationKind
Operations implements OutputBinding's Operations 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"`
}
Click to show internal directories.
Click to hide internal directories.