Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbStateMachine ¶
type DbStateMachine struct {
// contains filtered or unexported fields
}
func NewDbStateMachine ¶
func NewDbStateMachine(path string) *DbStateMachine
NewDbStateMachine returns a StateMachine for capturing and restoring the state of an sqlite database.
func (*DbStateMachine) Recovery ¶
func (d *DbStateMachine) Recovery(b []byte) error
Recovery restores the state of the database using the given data.
func (*DbStateMachine) Save ¶
func (d *DbStateMachine) Save() ([]byte, error)
Save captures the state of the database. The caller must ensure that no transaction is taking place during this call.
http://sqlite.org/howtocorrupt.html states it is safe to do this as long as no transaction is in progress.
type FailedSqlStmt ¶
type QueryResponse ¶
type QueryResponse struct { Time string `json:"time"` Failures []FailedSqlStmt `json:"failures"` Rows db.RowResults `json:"rows"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetStatistics ¶
GetStatistics returns an object storing statistics, which supports JSON marshalling.
func (*Server) HandleFunc ¶
This is a hack around Gorilla mux not providing the correct net/http HandleFunc() interface.
func (*Server) ListenAndServe ¶
ListenAndServe starts the server.
type ServerDiagnostics ¶
type ServerDiagnostics struct {
// contains filtered or unexported fields
}
func NewServerDiagnostics ¶
func NewServerDiagnostics() *ServerDiagnostics
NewServerDiagnostics creates a new ServerDiagnostics object.
type ServerMetrics ¶
type ServerMetrics struct {
// contains filtered or unexported fields
}
func NewServerMetrics ¶
func NewServerMetrics() *ServerMetrics
NewServerMetrics creates a new ServerMetrics object.
type SnapshotConf ¶
type SnapshotConf struct {
// contains filtered or unexported fields
}
type StmtResponse ¶
type StmtResponse struct { Time string `json:"time"` Failures []FailedSqlStmt `json:"failures"` }