Documentation ¶
Index ¶
- type ConfigCache
- type DbAdapter
- type MockConnection
- func (c *MockConnection) Close() error
- func (c *MockConnection) GetConfigObject(ctx context.Context, ref *configV1.ConfigRef) (*configV1.ConfigObject, error)
- func (c *MockConnection) GetConfigsForSelector(ctx context.Context, kind configV1.Kind, label *configV1.Label) ([]*configV1.ConfigObject, error)
- func (c *MockConnection) GetMock() *r.Mock
- type Options
- type RethinkDbConnection
- func (c *RethinkDbConnection) Close() error
- func (c *RethinkDbConnection) Connect() error
- func (c *RethinkDbConnection) GetConfigObject(ctx context.Context, ref *configV1.ConfigRef) (*configV1.ConfigObject, error)
- func (c *RethinkDbConnection) GetConfigsForSelector(ctx context.Context, kind configV1.Kind, label *configV1.Label) ([]*configV1.ConfigObject, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigCache ¶
type ConfigCache interface { GetConfigObject(context.Context, *configV1.ConfigRef) (*configV1.ConfigObject, error) GetScripts(context.Context, *configV1.BrowserConfig) ([]*configV1.ConfigObject, error) }
func NewConfigCache ¶
func NewConfigCache(db DbAdapter, ttl time.Duration) ConfigCache
type MockConnection ¶
type MockConnection struct {
*RethinkDbConnection
}
func NewMockConnection ¶
func NewMockConnection() *MockConnection
NewMockConnection creates a new mocked RethinkDbConnection object
func (*MockConnection) Close ¶
func (c *MockConnection) Close() error
func (*MockConnection) GetConfigObject ¶
func (c *MockConnection) GetConfigObject(ctx context.Context, ref *configV1.ConfigRef) (*configV1.ConfigObject, error)
func (*MockConnection) GetConfigsForSelector ¶
func (c *MockConnection) GetConfigsForSelector(ctx context.Context, kind configV1.Kind, label *configV1.Label) ([]*configV1.ConfigObject, error)
func (*MockConnection) GetMock ¶
func (c *MockConnection) GetMock() *r.Mock
type RethinkDbConnection ¶
type RethinkDbConnection struct {
// contains filtered or unexported fields
}
RethinkDbConnection holds the database connection database
func NewRethinkDbConnection ¶
func NewRethinkDbConnection(opts Options) *RethinkDbConnection
NewRethinkDbConnection creates a new RethinkDbConnection object
func (*RethinkDbConnection) Close ¶
func (c *RethinkDbConnection) Close() error
Close closes the RethinkDbConnection
func (*RethinkDbConnection) Connect ¶
func (c *RethinkDbConnection) Connect() error
Connect establishes connections
func (*RethinkDbConnection) GetConfigObject ¶
func (c *RethinkDbConnection) GetConfigObject(ctx context.Context, ref *configV1.ConfigRef) (*configV1.ConfigObject, error)
GetConfigObject fetches a config.ConfigObject referenced by a config.ConfigRef
func (*RethinkDbConnection) GetConfigsForSelector ¶
func (c *RethinkDbConnection) GetConfigsForSelector(ctx context.Context, kind configV1.Kind, label *configV1.Label) ([]*configV1.ConfigObject, error)
GetConfigsForSelector fetches a list of config.ConfigObject's matching config.Kind and config.Label
Click to show internal directories.
Click to hide internal directories.