durable

package
v0.0.0-...-487cae6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenSpannerClient

func OpenSpannerClient(ctx context.Context, name string) (*spanner.Client, error)

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func WrapDatabase

func WrapDatabase(client *spanner.Client, transaction newrelic.Transaction) *Database

func (*Database) Apply

func (db *Database) Apply(ctx context.Context, ms []*spanner.Mutation, collection, operation, query string) error

func (*Database) Close

func (db *Database) Close()

func (*Database) Query

func (db *Database) Query(ctx context.Context, statement spanner.Statement, collection, query string) *spanner.RowIterator

func (*Database) Read

func (db *Database) Read(ctx context.Context, table string, keys spanner.KeySet, columns []string, query string) *spanner.RowIterator

func (*Database) ReadOnlyTransaction

func (db *Database) ReadOnlyTransaction() *spanner.ReadOnlyTransaction

func (*Database) ReadRow

func (db *Database) ReadRow(ctx context.Context, table string, key spanner.Key, columns []string, query string) (*spanner.Row, error)

func (*Database) ReadUsingIndex

func (db *Database) ReadUsingIndex(ctx context.Context, table, index string, keys spanner.KeySet, columns []string, query string) *spanner.RowIterator

func (*Database) ReadWriteTransaction

func (db *Database) ReadWriteTransaction(ctx context.Context, impl func(context.Context, *spanner.ReadWriteTransaction) error, collection, operation, query string) (time.Time, error)

type Limiter

type Limiter struct {
	// contains filtered or unexported fields
}

func NewLimiter

func NewLimiter(addr string, db int) (*Limiter, error)

func (*Limiter) Available

func (limiter *Limiter) Available(key string, window time.Duration, max int, shouldIncr bool) (int, error)

func (*Limiter) Clear

func (limiter *Limiter) Clear(key string, window time.Duration) error

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func BuildLogger

func BuildLogger(client *LoggerClient, name string, r *http.Request) *Logger

func (*Logger) Debug

func (logger *Logger) Debug(v ...interface{})

func (*Logger) Debugf

func (logger *Logger) Debugf(format string, v ...interface{})

func (*Logger) Error

func (logger *Logger) Error(v ...interface{})

func (*Logger) Errorf

func (logger *Logger) Errorf(format string, v ...interface{})

func (*Logger) FillResponse

func (logger *Logger) FillResponse(status int, responseSize int64, latency time.Duration)

func (*Logger) Info

func (logger *Logger) Info(v ...interface{})

func (*Logger) Infof

func (logger *Logger) Infof(format string, v ...interface{})

func (*Logger) Panicln

func (logger *Logger) Panicln(v ...interface{})

type LoggerClient

type LoggerClient struct {
	// contains filtered or unexported fields
}

func NewLoggerClient

func NewLoggerClient(project string, syslog bool) (*LoggerClient, error)

func (*LoggerClient) Close

func (client *LoggerClient) Close() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL