coelacanth

package module
v0.0.0-...-1813979 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2016 License: MIT Imports: 8 Imported by: 2

README

coelacanth

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB           DB
	ListenerFunc func(string) (net.Listener, error)
	Logger       *log.Logger
}

type DB

type DB interface {
	Begin() (*sql.Tx, error)
	Close() error
	Driver() driver.Driver
	Exec(query string, args ...interface{}) (sql.Result, error)
	Ping() error
	Prepare(query string) (*sql.Stmt, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
	SetMaxIdleConns(n int)
	SetMaxOpenConns(n int)
	Stats() sql.DBStats
}

type Server

type Server struct {
	Logger *log.Logger
	DB     DB
	// contains filtered or unexported fields
}

func NewServer

func NewServer(c *Config) *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) GetBuilder

func (s *Server) GetBuilder() *flatbuffers.Builder

func (*Server) GetPrefixedBuf

func (s *Server) GetPrefixedBuf() *prefixedio.Buffer

func (*Server) PutBuilder

func (s *Server) PutBuilder(b *flatbuffers.Builder)

func (*Server) PutPrefixedBuf

func (s *Server) PutPrefixedBuf(b *prefixedio.Buffer)

func (*Server) Run

func (s *Server) Run(addr string, handler func(net.Conn, *Server)) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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