Documentation
¶
Overview ¶
Package dynamicconfig is a generated GoMock package.
Index ¶
- Constants
- Variables
- type Client
- type Collection
- func (c *Collection) GetBoolProperty(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFn
- func (c *Collection) GetBoolPropertyFilteredByDomain(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithDomainFilter
- func (c *Collection) GetBoolPropertyFilteredByDomainID(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithDomainIDFilter
- func (c *Collection) GetBoolPropertyFilteredByDomainIDAndWorkflowID(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithDomainIDAndWorkflowIDFilter
- func (c *Collection) GetBoolPropertyFilteredByShardID(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithShardIDFilter
- func (c *Collection) GetBoolPropertyFilteredByTaskListInfo(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
- func (c *Collection) GetDurationProperty(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFn
- func (c *Collection) GetDurationPropertyFilteredByDomain(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithDomainFilter
- func (c *Collection) GetDurationPropertyFilteredByDomainID(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithDomainIDFilter
- func (c *Collection) GetDurationPropertyFilteredByShardID(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithShardIDFilter
- func (c *Collection) GetDurationPropertyFilteredByTaskListInfo(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
- func (c *Collection) GetDurationPropertyFilteredByWorkflowType(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithWorkflowTypeFilter
- func (c *Collection) GetFloat64Property(key dynamicproperties.FloatKey) dynamicproperties.FloatPropertyFn
- func (c *Collection) GetFloat64PropertyFilteredByShardID(key dynamicproperties.FloatKey) dynamicproperties.FloatPropertyFnWithShardIDFilter
- func (c *Collection) GetFloat64PropertyFilteredByTaskListInfo(key dynamicproperties.FloatKey) dynamicproperties.FloatPropertyFnWithTaskListInfoFilters
- func (c *Collection) GetIntProperty(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFn
- func (c *Collection) GetIntPropertyFilteredByDomain(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithDomainFilter
- func (c *Collection) GetIntPropertyFilteredByShardID(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithShardIDFilter
- func (c *Collection) GetIntPropertyFilteredByTaskListInfo(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithTaskListInfoFilters
- func (c *Collection) GetIntPropertyFilteredByWorkflowType(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithWorkflowTypeFilter
- func (c *Collection) GetListProperty(key dynamicproperties.ListKey) dynamicproperties.ListPropertyFn
- func (c *Collection) GetMapProperty(key dynamicproperties.MapKey) dynamicproperties.MapPropertyFn
- func (c *Collection) GetMapPropertyFilteredByDomain(key dynamicproperties.MapKey) dynamicproperties.MapPropertyFnWithDomainFilter
- func (c *Collection) GetProperty(key dynamicproperties.Key) dynamicproperties.PropertyFn
- func (c *Collection) GetStringProperty(key dynamicproperties.StringKey) dynamicproperties.StringPropertyFn
- func (c *Collection) GetStringPropertyFilteredByDomain(key dynamicproperties.StringKey) dynamicproperties.StringPropertyFnWithDomainFilter
- func (c *Collection) GetStringPropertyFilteredByRatelimitKey(key dynamicproperties.StringKey) dynamicproperties.StringPropertyWithRatelimitKeyFilter
- func (c *Collection) GetStringPropertyFilteredByTaskListInfo(key dynamicproperties.StringKey) dynamicproperties.StringPropertyFnWithTaskListInfoFilters
- type FileBasedClientConfig
- type MockClient
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) GetBoolValue(name dynamicproperties.BoolKey, filters map[dynamicproperties.Filter]any) (bool, error)
- func (m *MockClient) GetDurationValue(name dynamicproperties.DurationKey, filters map[dynamicproperties.Filter]any) (time.Duration, error)
- func (m *MockClient) GetFloatValue(name dynamicproperties.FloatKey, filters map[dynamicproperties.Filter]any) (float64, error)
- func (m *MockClient) GetIntValue(name dynamicproperties.IntKey, filters map[dynamicproperties.Filter]any) (int, error)
- func (m *MockClient) GetListValue(name dynamicproperties.ListKey, filters map[dynamicproperties.Filter]any) ([]any, error)
- func (m *MockClient) GetMapValue(name dynamicproperties.MapKey, filters map[dynamicproperties.Filter]any) (map[string]any, error)
- func (m *MockClient) GetStringValue(name dynamicproperties.StringKey, filters map[dynamicproperties.Filter]any) (string, error)
- func (m *MockClient) GetValue(name dynamicproperties.Key) (any, error)
- func (m *MockClient) GetValueWithFilters(name dynamicproperties.Key, filters map[dynamicproperties.Filter]any) (any, error)
- func (m *MockClient) ListValue(name dynamicproperties.Key) ([]*types.DynamicConfigEntry, error)
- func (m *MockClient) RestoreValue(name dynamicproperties.Key, filters map[dynamicproperties.Filter]any) error
- func (m *MockClient) UpdateValue(name dynamicproperties.Key, value any) error
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) GetBoolValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) GetDurationValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) GetFloatValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) GetIntValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) GetListValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) GetMapValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) GetStringValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) GetValue(name any) *gomock.Call
- func (mr *MockClientMockRecorder) GetValueWithFilters(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) ListValue(name any) *gomock.Call
- func (mr *MockClientMockRecorder) RestoreValue(name, filters any) *gomock.Call
- func (mr *MockClientMockRecorder) UpdateValue(name, value any) *gomock.Call
Constants ¶
const ( ConfigStoreClient = "configstore" FileBasedClient = "filebased" InMemoryClient = "memory" NopClient = "nop" )
Variables ¶
var NotFoundError = &types.EntityNotExistsError{
Message: "unable to find key",
}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetValue(name dynamicproperties.Key) (interface{}, error)
GetValueWithFilters(name dynamicproperties.Key, filters map[dynamicproperties.Filter]interface{}) (interface{}, error)
GetIntValue(name dynamicproperties.IntKey, filters map[dynamicproperties.Filter]interface{}) (int, error)
GetFloatValue(name dynamicproperties.FloatKey, filters map[dynamicproperties.Filter]interface{}) (float64, error)
GetBoolValue(name dynamicproperties.BoolKey, filters map[dynamicproperties.Filter]interface{}) (bool, error)
GetStringValue(name dynamicproperties.StringKey, filters map[dynamicproperties.Filter]interface{}) (string, error)
GetMapValue(name dynamicproperties.MapKey, filters map[dynamicproperties.Filter]interface{}) (map[string]interface{}, error)
GetDurationValue(name dynamicproperties.DurationKey, filters map[dynamicproperties.Filter]interface{}) (time.Duration, error)
GetListValue(name dynamicproperties.ListKey, filters map[dynamicproperties.Filter]interface{}) ([]interface{}, error)
// UpdateValue takes value as map and updates by overriding. It doesn't support update with filters.
UpdateValue(name dynamicproperties.Key, value interface{}) error
RestoreValue(name dynamicproperties.Key, filters map[dynamicproperties.Filter]interface{}) error
ListValue(name dynamicproperties.Key) ([]*types.DynamicConfigEntry, error)
}
Client allows fetching values from a dynamic configuration system NOTE: This does not have async options right now. In the interest of keeping it minimal, we can add when requirement arises.
func NewFileBasedClient ¶
func NewFileBasedClient(config *FileBasedClientConfig, logger log.Logger, doneCh chan struct{}) (Client, error)
NewFileBasedClient creates a file based client.
func NewInMemoryClient ¶
func NewInMemoryClient() Client
NewInMemoryClient creates a new in memory dynamic config client for testing purpose
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
Collection wraps dynamic config client with a closure so that across the code, the config values can be directly accessed by calling the function without propagating the client everywhere in code
func NewCollection ¶
func NewCollection( client Client, logger log.Logger, filterOptions ...dynamicproperties.FilterOption, ) *Collection
NewCollection creates a new collection
func NewNopCollection ¶
func NewNopCollection() *Collection
NewNopCollection creates a new nop collection
func (*Collection) GetBoolProperty ¶
func (c *Collection) GetBoolProperty(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFn
GetBoolProperty gets property and asserts that it's an bool
func (*Collection) GetBoolPropertyFilteredByDomain ¶
func (c *Collection) GetBoolPropertyFilteredByDomain(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithDomainFilter
GetBoolPropertyFilteredByDomain gets property with domain filter and asserts that it's a bool
func (*Collection) GetBoolPropertyFilteredByDomainID ¶
func (c *Collection) GetBoolPropertyFilteredByDomainID(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithDomainIDFilter
GetBoolPropertyFilteredByDomainID gets property with domainID filter and asserts that it's a bool
func (*Collection) GetBoolPropertyFilteredByDomainIDAndWorkflowID ¶ added in v0.24.0
func (c *Collection) GetBoolPropertyFilteredByDomainIDAndWorkflowID(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithDomainIDAndWorkflowIDFilter
GetBoolPropertyFilteredByDomainIDAndWorkflowID gets property with domainID and workflowID filters and asserts that it's a bool
func (*Collection) GetBoolPropertyFilteredByShardID ¶ added in v1.3.2
func (c *Collection) GetBoolPropertyFilteredByShardID(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithShardIDFilter
GetBoolPropertyFilteredByShardID gets property with shardID as filter and asserts that it's a bool
func (*Collection) GetBoolPropertyFilteredByTaskListInfo ¶
func (c *Collection) GetBoolPropertyFilteredByTaskListInfo(key dynamicproperties.BoolKey) dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
GetBoolPropertyFilteredByTaskListInfo gets property with taskListInfo as filters and asserts that it's an bool
func (*Collection) GetDurationProperty ¶
func (c *Collection) GetDurationProperty(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFn
GetDurationProperty gets property and asserts that it's a duration
func (*Collection) GetDurationPropertyFilteredByDomain ¶
func (c *Collection) GetDurationPropertyFilteredByDomain(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithDomainFilter
GetDurationPropertyFilteredByDomain gets property with domain filter and asserts that it's a duration
func (*Collection) GetDurationPropertyFilteredByDomainID ¶
func (c *Collection) GetDurationPropertyFilteredByDomainID(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithDomainIDFilter
GetDurationPropertyFilteredByDomainID gets property with domainID filter and asserts that it's a duration
func (*Collection) GetDurationPropertyFilteredByShardID ¶
func (c *Collection) GetDurationPropertyFilteredByShardID(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithShardIDFilter
GetDurationPropertyFilteredByShardID gets property with shardID id as filter and asserts that it's a duration
func (*Collection) GetDurationPropertyFilteredByTaskListInfo ¶
func (c *Collection) GetDurationPropertyFilteredByTaskListInfo(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
GetDurationPropertyFilteredByTaskListInfo gets property with taskListInfo as filters and asserts that it's a duration
func (*Collection) GetDurationPropertyFilteredByWorkflowType ¶ added in v0.24.0
func (c *Collection) GetDurationPropertyFilteredByWorkflowType(key dynamicproperties.DurationKey) dynamicproperties.DurationPropertyFnWithWorkflowTypeFilter
GetDurationPropertyFilteredByWorkflowType gets property with workflow type filter and asserts that it's a duration
func (*Collection) GetFloat64Property ¶
func (c *Collection) GetFloat64Property(key dynamicproperties.FloatKey) dynamicproperties.FloatPropertyFn
GetFloat64Property gets property and asserts that it's a float64
func (*Collection) GetFloat64PropertyFilteredByShardID ¶
func (c *Collection) GetFloat64PropertyFilteredByShardID(key dynamicproperties.FloatKey) dynamicproperties.FloatPropertyFnWithShardIDFilter
GetFloat64PropertyFilteredByShardID gets property with shardID filter and asserts that it's a float64
func (*Collection) GetFloat64PropertyFilteredByTaskListInfo ¶ added in v1.2.15
func (c *Collection) GetFloat64PropertyFilteredByTaskListInfo(key dynamicproperties.FloatKey) dynamicproperties.FloatPropertyFnWithTaskListInfoFilters
GetFloatPropertyFilteredByTaskListInfo gets property with taskListInfo as filters and asserts that it's a float64
func (*Collection) GetIntProperty ¶
func (c *Collection) GetIntProperty(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFn
GetIntProperty gets property and asserts that it's an integer
func (*Collection) GetIntPropertyFilteredByDomain ¶
func (c *Collection) GetIntPropertyFilteredByDomain(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithDomainFilter
GetIntPropertyFilteredByDomain gets property with domain filter and asserts that it's an integer
func (*Collection) GetIntPropertyFilteredByShardID ¶
func (c *Collection) GetIntPropertyFilteredByShardID(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithShardIDFilter
GetIntPropertyFilteredByShardID gets property with shardID as filter and asserts that it's an integer
func (*Collection) GetIntPropertyFilteredByTaskListInfo ¶
func (c *Collection) GetIntPropertyFilteredByTaskListInfo(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithTaskListInfoFilters
GetIntPropertyFilteredByTaskListInfo gets property with taskListInfo as filters and asserts that it's an integer
func (*Collection) GetIntPropertyFilteredByWorkflowType ¶ added in v0.24.0
func (c *Collection) GetIntPropertyFilteredByWorkflowType(key dynamicproperties.IntKey) dynamicproperties.IntPropertyFnWithWorkflowTypeFilter
GetIntPropertyFilteredByWorkflowType gets property with workflow type filter and asserts that it's an integer
func (*Collection) GetListProperty ¶ added in v1.0.0
func (c *Collection) GetListProperty(key dynamicproperties.ListKey) dynamicproperties.ListPropertyFn
func (*Collection) GetMapProperty ¶
func (c *Collection) GetMapProperty(key dynamicproperties.MapKey) dynamicproperties.MapPropertyFn
GetMapProperty gets property and asserts that it's a map
func (*Collection) GetMapPropertyFilteredByDomain ¶ added in v1.2.18
func (c *Collection) GetMapPropertyFilteredByDomain(key dynamicproperties.MapKey) dynamicproperties.MapPropertyFnWithDomainFilter
GetMapPropertyFilteredByDomain gets property with domain filter and asserts that it's a map
func (*Collection) GetProperty ¶
func (c *Collection) GetProperty(key dynamicproperties.Key) dynamicproperties.PropertyFn
GetProperty gets a interface property and returns defaultValue if property is not found
func (*Collection) GetStringProperty ¶
func (c *Collection) GetStringProperty(key dynamicproperties.StringKey) dynamicproperties.StringPropertyFn
GetStringProperty gets property and asserts that it's an string
func (*Collection) GetStringPropertyFilteredByDomain ¶
func (c *Collection) GetStringPropertyFilteredByDomain(key dynamicproperties.StringKey) dynamicproperties.StringPropertyFnWithDomainFilter
GetStringPropertyFilteredByDomain gets property with domain filter and asserts that it's a string
func (*Collection) GetStringPropertyFilteredByRatelimitKey ¶ added in v1.2.12
func (c *Collection) GetStringPropertyFilteredByRatelimitKey(key dynamicproperties.StringKey) dynamicproperties.StringPropertyWithRatelimitKeyFilter
func (*Collection) GetStringPropertyFilteredByTaskListInfo ¶ added in v1.2.14
func (c *Collection) GetStringPropertyFilteredByTaskListInfo(key dynamicproperties.StringKey) dynamicproperties.StringPropertyFnWithTaskListInfoFilters
type FileBasedClientConfig ¶
type FileBasedClientConfig struct {
Filepath string `yaml:"filepath"`
PollInterval time.Duration `yaml:"pollInterval"`
}
FileBasedClientConfig is the config for the file based dynamic config client. It specifies where the config file is stored and how often the config should be updated by checking the config file again.
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) GetBoolValue ¶
func (m *MockClient) GetBoolValue(name dynamicproperties.BoolKey, filters map[dynamicproperties.Filter]any) (bool, error)
GetBoolValue mocks base method.
func (*MockClient) GetDurationValue ¶
func (m *MockClient) GetDurationValue(name dynamicproperties.DurationKey, filters map[dynamicproperties.Filter]any) (time.Duration, error)
GetDurationValue mocks base method.
func (*MockClient) GetFloatValue ¶
func (m *MockClient) GetFloatValue(name dynamicproperties.FloatKey, filters map[dynamicproperties.Filter]any) (float64, error)
GetFloatValue mocks base method.
func (*MockClient) GetIntValue ¶
func (m *MockClient) GetIntValue(name dynamicproperties.IntKey, filters map[dynamicproperties.Filter]any) (int, error)
GetIntValue mocks base method.
func (*MockClient) GetListValue ¶ added in v1.0.0
func (m *MockClient) GetListValue(name dynamicproperties.ListKey, filters map[dynamicproperties.Filter]any) ([]any, error)
GetListValue mocks base method.
func (*MockClient) GetMapValue ¶
func (m *MockClient) GetMapValue(name dynamicproperties.MapKey, filters map[dynamicproperties.Filter]any) (map[string]any, error)
GetMapValue mocks base method.
func (*MockClient) GetStringValue ¶
func (m *MockClient) GetStringValue(name dynamicproperties.StringKey, filters map[dynamicproperties.Filter]any) (string, error)
GetStringValue mocks base method.
func (*MockClient) GetValue ¶
func (m *MockClient) GetValue(name dynamicproperties.Key) (any, error)
GetValue mocks base method.
func (*MockClient) GetValueWithFilters ¶
func (m *MockClient) GetValueWithFilters(name dynamicproperties.Key, filters map[dynamicproperties.Filter]any) (any, error)
GetValueWithFilters mocks base method.
func (*MockClient) ListValue ¶ added in v0.23.1
func (m *MockClient) ListValue(name dynamicproperties.Key) ([]*types.DynamicConfigEntry, error)
ListValue mocks base method.
func (*MockClient) RestoreValue ¶ added in v0.23.1
func (m *MockClient) RestoreValue(name dynamicproperties.Key, filters map[dynamicproperties.Filter]any) error
RestoreValue mocks base method.
func (*MockClient) UpdateValue ¶
func (m *MockClient) UpdateValue(name dynamicproperties.Key, value any) error
UpdateValue mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) GetBoolValue ¶
func (mr *MockClientMockRecorder) GetBoolValue(name, filters any) *gomock.Call
GetBoolValue indicates an expected call of GetBoolValue.
func (*MockClientMockRecorder) GetDurationValue ¶
func (mr *MockClientMockRecorder) GetDurationValue(name, filters any) *gomock.Call
GetDurationValue indicates an expected call of GetDurationValue.
func (*MockClientMockRecorder) GetFloatValue ¶
func (mr *MockClientMockRecorder) GetFloatValue(name, filters any) *gomock.Call
GetFloatValue indicates an expected call of GetFloatValue.
func (*MockClientMockRecorder) GetIntValue ¶
func (mr *MockClientMockRecorder) GetIntValue(name, filters any) *gomock.Call
GetIntValue indicates an expected call of GetIntValue.
func (*MockClientMockRecorder) GetListValue ¶ added in v1.0.0
func (mr *MockClientMockRecorder) GetListValue(name, filters any) *gomock.Call
GetListValue indicates an expected call of GetListValue.
func (*MockClientMockRecorder) GetMapValue ¶
func (mr *MockClientMockRecorder) GetMapValue(name, filters any) *gomock.Call
GetMapValue indicates an expected call of GetMapValue.
func (*MockClientMockRecorder) GetStringValue ¶
func (mr *MockClientMockRecorder) GetStringValue(name, filters any) *gomock.Call
GetStringValue indicates an expected call of GetStringValue.
func (*MockClientMockRecorder) GetValue ¶
func (mr *MockClientMockRecorder) GetValue(name any) *gomock.Call
GetValue indicates an expected call of GetValue.
func (*MockClientMockRecorder) GetValueWithFilters ¶
func (mr *MockClientMockRecorder) GetValueWithFilters(name, filters any) *gomock.Call
GetValueWithFilters indicates an expected call of GetValueWithFilters.
func (*MockClientMockRecorder) ListValue ¶ added in v0.23.1
func (mr *MockClientMockRecorder) ListValue(name any) *gomock.Call
ListValue indicates an expected call of ListValue.
func (*MockClientMockRecorder) RestoreValue ¶ added in v0.23.1
func (mr *MockClientMockRecorder) RestoreValue(name, filters any) *gomock.Call
RestoreValue indicates an expected call of RestoreValue.
func (*MockClientMockRecorder) UpdateValue ¶
func (mr *MockClientMockRecorder) UpdateValue(name, value any) *gomock.Call
UpdateValue indicates an expected call of UpdateValue.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package configstore is a generated GoMock package.
|
Package configstore is a generated GoMock package. |