Documentation ¶
Index ¶
- Constants
- Variables
- type Db
- type SqlDb
- func (d *SqlDb) AcquireOrRenewRole(roleId string, nodeId string, lockDur time.Duration) (bool, string, error)
- func (d *SqlDb) Close()
- func (d *SqlDb) DeleteAll() error
- func (d *SqlDb) GetComponent(componentName string) (component v1.Component, err error)
- func (d *SqlDb) GetComponentDeployCount(componentName string, version int64) (int, error)
- func (d *SqlDb) GetEventSource(eventSourceName string) (es v1.EventSource, err error)
- func (d *SqlDb) IncrementComponentDeployCount(componentName string, version int64) error
- func (d *SqlDb) ListComponents(input v1.ListComponentsInput) (output v1.ListComponentsOutput, err error)
- func (d *SqlDb) ListEventSources(input v1.ListEventSourcesInput) (v1.ListEventSourcesOutput, error)
- func (d *SqlDb) ListNodeStatus() ([]v1.NodeStatus, error)
- func (d *SqlDb) ListProjects(input v1.ListProjectsInput) (v1.ListProjectsOutput, error)
- func (d *SqlDb) Migrate() error
- func (d *SqlDb) PutComponent(component v1.Component) (int64, error)
- func (d *SqlDb) PutEventSource(eventSource v1.EventSource) (int64, error)
- func (d *SqlDb) PutNodeStatus(status v1.NodeStatus) error
- func (d *SqlDb) ReleaseAllRoles(nodeId string) error
- func (d *SqlDb) ReleaseRole(roleId string, nodeId string) error
- func (d *SqlDb) RemoveComponent(componentName string) (found bool, err error)
- func (d *SqlDb) RemoveEventSource(eventSourceName string) (bool, error)
- func (d *SqlDb) RemoveNodeStatus(nodeId string) (bool, error)
- func (d *SqlDb) RemoveNodeStatusOlderThan(observedAt time.Time) (int64, error)
- func (d *SqlDb) SetEventSourcesEnabled(eventSourceNames []string, enabled bool) (int64, error)
Constants ¶
View Source
const ( RolePlacement = "placement" RoleAutoScale = "autoscale" RoleCron = "cron" )
Variables ¶
View Source
var AlreadyExists = fmt.Errorf("Entity already exists")
View Source
var IncorrectPreviousVersion = fmt.Errorf("Incorrect PreviousVersion")
View Source
var NotFound = fmt.Errorf("Not Found")
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db interface { Migrate() error AcquireOrRenewRole(roleId string, nodeId string, lockDur time.Duration) (bool, string, error) ReleaseRole(roleId string, nodeId string) error ReleaseAllRoles(nodeId string) error ListProjects(input v1.ListProjectsInput) (v1.ListProjectsOutput, error) PutComponent(component v1.Component) (int64, error) GetComponent(componentName string) (v1.Component, error) ListComponents(input v1.ListComponentsInput) (v1.ListComponentsOutput, error) RemoveComponent(componentName string) (bool, error) GetComponentDeployCount(componentName string, version int64) (int, error) IncrementComponentDeployCount(componentName string, version int64) error PutEventSource(eventSource v1.EventSource) (int64, error) GetEventSource(eventSourceName string) (v1.EventSource, error) ListEventSources(input v1.ListEventSourcesInput) (v1.ListEventSourcesOutput, error) RemoveEventSource(eventSourceName string) (bool, error) SetEventSourcesEnabled(eventSourceNames []string, enabled bool) (int64, error) PutNodeStatus(status v1.NodeStatus) error ListNodeStatus() ([]v1.NodeStatus, error) RemoveNodeStatusOlderThan(observedAt time.Time) (int64, error) RemoveNodeStatus(nodeId string) (bool, error) }
type SqlDb ¶
type SqlDb struct { DebugLog bool // contains filtered or unexported fields }
func NewTestSqlDb ¶
func NewTestSqlDb() *SqlDb
func (*SqlDb) AcquireOrRenewRole ¶
func (*SqlDb) GetComponent ¶
func (*SqlDb) GetComponentDeployCount ¶
func (*SqlDb) GetEventSource ¶
func (d *SqlDb) GetEventSource(eventSourceName string) (es v1.EventSource, err error)
func (*SqlDb) IncrementComponentDeployCount ¶
func (*SqlDb) ListComponents ¶
func (d *SqlDb) ListComponents(input v1.ListComponentsInput) (output v1.ListComponentsOutput, err error)
func (*SqlDb) ListEventSources ¶
func (d *SqlDb) ListEventSources(input v1.ListEventSourcesInput) (v1.ListEventSourcesOutput, error)
func (*SqlDb) ListNodeStatus ¶
func (d *SqlDb) ListNodeStatus() ([]v1.NodeStatus, error)
func (*SqlDb) ListProjects ¶
func (d *SqlDb) ListProjects(input v1.ListProjectsInput) (v1.ListProjectsOutput, error)
func (*SqlDb) PutEventSource ¶
func (d *SqlDb) PutEventSource(eventSource v1.EventSource) (int64, error)
func (*SqlDb) PutNodeStatus ¶
func (d *SqlDb) PutNodeStatus(status v1.NodeStatus) error
func (*SqlDb) ReleaseAllRoles ¶
func (*SqlDb) RemoveComponent ¶
func (*SqlDb) RemoveEventSource ¶
func (*SqlDb) RemoveNodeStatusOlderThan ¶
Click to show internal directories.
Click to hide internal directories.