Documentation
¶
Index ¶
- Variables
- type Target
- func (t *Target) Close(ctx context.Context) error
- func (t *Target) Open(ctx context.Context) error
- func (t *Target) PerformWithHandler(ctx context.Context, handler func(*request.Response), req database.Request) error
- func (t *Target) Ping(ctx context.Context) error
- func (t *Target) Request(ctx context.Context, req database.Request) (chan *request.Response, error)
- func (t *Target) RequestWithHandler(ctx context.Context, handler func(*request.Response), req database.Request) error
- func (t *Target) String() string
- func (t *Target) Update(ctx context.Context, opts ...TargetOption) error
- type TargetOption
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRequests = errors.New("no requests provided")
Functions ¶
This section is empty.
Types ¶
type Target ¶
type Target struct {
Name string
Type Type
DSN database.DataSourceNamer
DBType database.Type
// contains filtered or unexported fields
}
func (*Target) PerformWithHandler ¶
func (t *Target) PerformWithHandler(ctx context.Context, handler func(*request.Response), req database.Request) error
Blocking PerformWithHandler sends requests and processes responses synchronously using a handler. It blocks until all responses are received and handled or the context is cancelled.
type TargetOption ¶
func WithDataSource ¶
func WithDataSource(dsn database.DataSourceNamer) TargetOption
func WithName ¶
func WithName(newName string) TargetOption
Click to show internal directories.
Click to hide internal directories.