package timeout

import "github.com/datastax/astra-db-go/v2/astra/internal/timeout"

Index

Types

type Manager

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

TimeoutManager manages timeouts for operations, tracking elapsed time and returning remaining time for each request.

func NewMultiCall
func NewMultiCall(opts *options.APIOptions) *Manager
func NewSingleCall
func NewSingleCall(opts *options.APIOptions, tt SingleType) *Manager
func (*Manager) Advance
func (tm *Manager) Advance() time.Duration
func (*Manager) ApplyToContext
func (tm *Manager) ApplyToContext(ctx context.Context) (context.Context, context.CancelFunc)

type SingleType

type SingleType int

SingleType represents the type of timeout to use for single-call operations.

const (
	GeneralMethod SingleType = iota
	CollectionAdmin
	TableAdmin
	KeyspaceAdmin
	DatabaseAdmin
)