Documentation
¶
Index ¶
- Variables
- func Carry(session Session) contextx.Carrier
- func With(ctx context.Context, session Session) context.Context
- type Adaptor
- type AdaptorOption
- type Endpoint
- func (d *Endpoint) ApplyCatalog(name string, catalogs ...builder.Catalog)
- func (d *Endpoint) Catalog() builder.Catalog
- func (d *Endpoint) Close() error
- func (d *Endpoint) Init(ctx context.Context) error
- func (d *Endpoint) LivenessCheck(ctx context.Context) (v types.LivenessData)
- func (d *Endpoint) Name() string
- func (d *Endpoint) Run(ctx context.Context) error
- func (d *Endpoint) Session() Session
- type EndpointOption
- type OptionFunc
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Scan = scanner.Scan Open = adaptor.Open )
Functions ¶
Types ¶
type AdaptorOption ¶ added in v0.1.18
type AdaptorOption struct {
ReadOnly bool
}
type Endpoint ¶ added in v0.1.13
type Endpoint struct {
types.Endpoint[EndpointOption]
Readonly types.Endpoint[EndpointOption]
// contains filtered or unexported fields
}
func (*Endpoint) ApplyCatalog ¶ added in v0.1.18
ApplyCatalog should do before endpoint initialization
func (*Endpoint) LivenessCheck ¶ added in v0.1.20
func (d *Endpoint) LivenessCheck(ctx context.Context) (v types.LivenessData)
type EndpointOption ¶ added in v0.1.18
type OptionFunc ¶ added in v0.0.3
type OptionFunc func(*AdaptorOption)
func ReadOnly ¶ added in v0.0.3
func ReadOnly() OptionFunc
type Session ¶ added in v0.0.3
type Session interface {
// Database physically endpoint
Database() string
// Schema logically
Schema() string
// Name returns session name
Name() string
// T picks table from session
T(any) builder.Table
// Tx exec query
Tx(context.Context, func(context.Context) error) error
// Adaptor returns session adaptor
Adaptor(...OptionFunc) adaptor.Adaptor
}
Click to show internal directories.
Click to hide internal directories.