...

Package sdk

import "github.com/aws/aws-sdk-go-v2/internal/sdk"
Overview
Index

Overview ▾

Variables

NowTime is a value for getting the current time. This value can be overridden for testing mocking out current time.

var NowTime func() time.Time

Sleep is a value for sleeping for a duration. This value can be overridden for testing and mocking out sleep duration.

var Sleep func(time.Duration)

SleepWithContext will wait for the timer duration to expire, or the context is canceled. Which ever happens first. If the context is canceled the Context's error will be returned.

This value can be overridden for testing and mocking out sleep duration.

var SleepWithContext func(context.Context, time.Duration) error

func TestingUseNopSleep

func TestingUseNopSleep() func()

TestingUseNopSleep is a utility for disabling sleep across the SDK for testing.

func TestingUseReferenceTime

func TestingUseReferenceTime(referenceTime time.Time) func()

TestingUseReferenceTime is a utility for swapping the time function across the SDK to return a specific reference time for testing purposes.

type Invalidator

Invalidator provides access to a type's invalidate method to make it invalidate it cache.

e.g aws.SafeCredentialsProvider's Invalidate method.

type Invalidator interface {
    Invalidate()
}