[State Memcached] Adds Component Metadata Schema (#3061)
Signed-off-by: robertojrojas <robertojrojas@gmail.com>
This commit is contained in:
parent
ff0aef40b1
commit
2baaecd841
|
|
@ -50,9 +50,9 @@ type Memcached struct {
|
|||
}
|
||||
|
||||
type memcachedMetadata struct {
|
||||
Hosts []string
|
||||
MaxIdleConnections int
|
||||
Timeout int
|
||||
Hosts []string `mapstructure:"hosts"`
|
||||
MaxIdleConnections int `mapstructure:"maxIdleConnections"`
|
||||
Timeout int `mapstructure:"timeout"`
|
||||
}
|
||||
|
||||
func NewMemCacheStateStore(logger logger.Logger) state.Store {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
# yaml-language-server: $schema=../../component-metadata-schema.json
|
||||
schemaVersion: v1
|
||||
type: state
|
||||
name: memcached
|
||||
version: v1
|
||||
status: stable
|
||||
title: "Memcached"
|
||||
urls:
|
||||
- title: Reference
|
||||
url: https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-memcached/
|
||||
capabilities:
|
||||
- crud
|
||||
- ttl
|
||||
metadata:
|
||||
- name: hosts
|
||||
type: string
|
||||
required: true
|
||||
description: |
|
||||
Comma delimited endpoints
|
||||
example: '"memcached.default.svc.cluster.local:11211"'
|
||||
- name: maxIdleConnections
|
||||
type: number
|
||||
default: '2'
|
||||
description: |
|
||||
The max number of idle connections.
|
||||
example: '"3"'
|
||||
- name: timeout
|
||||
type: duration
|
||||
description: |
|
||||
The timeout for the calls. Defaults to "1000ms"
|
||||
example: '"1000ms"'
|
||||
Loading…
Reference in New Issue