Documentation ¶
Index ¶
- func NewConn() (*dbr.Connection, error)
- type Adapter
- type DB
- type EventLogger
- func (n *EventLogger) Event(eventName string)
- func (n *EventLogger) EventErr(eventName string, err error) error
- func (n *EventLogger) EventErrKv(eventName string, err error, kvs map[string]string) error
- func (n *EventLogger) EventKv(eventName string, kvs map[string]string)
- func (n *EventLogger) Timing(eventName string, nanoseconds int64)
- func (n *EventLogger) TimingKv(eventName string, nanoseconds int64, kvs map[string]string)
- type TxAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConn ¶
func NewConn() (*dbr.Connection, error)
NewConn tries to establish connection with database
Types ¶
type Adapter ¶
type Adapter interface { TxAdapter model.QueriesAdapter }
type DB ¶
func (*DB) NewSession ¶
type EventLogger ¶
type EventLogger struct {
// contains filtered or unexported fields
}
EventLogger is an implementation of the dbr.EventReceiver
func NewLogger ¶
func NewLogger() *EventLogger
func (*EventLogger) Event ¶
func (n *EventLogger) Event(eventName string)
Event receives a simple notification when various events occur
func (*EventLogger) EventErr ¶
func (n *EventLogger) EventErr(eventName string, err error) error
EventErr receives a notification of an error if one occurs
func (*EventLogger) EventErrKv ¶
EventErrKv receives a notification of an error if one occurs along with optional key/value data
func (*EventLogger) EventKv ¶
func (n *EventLogger) EventKv(eventName string, kvs map[string]string)
EventKv receives a notification when various events occur along with optional key/value data
func (*EventLogger) Timing ¶
func (n *EventLogger) Timing(eventName string, nanoseconds int64)
Timing receives the time an event took to happen
Click to show internal directories.
Click to hide internal directories.