You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: token_rate_limit.go
    path of file: ./repos/buildkit/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit
    
    the code of the file until where you have to start completion: package ratelimit

import (
	"context"
	"fmt"
)

type rateToken struct {
	tokenCost uint
	bucket    
    
func (l *TokenRateLimit) GetToken(ctx context.Context, cost uint) (func() error, error) {
	select {
	case <-ctx.Done():
		return nil, canceledError{Err: ctx.Err()}
	default:
	}
	if avail, ok := l.bucket.Retrieve(cost); !ok {
		return nil, QuotaExceededError{Available: avail, Requested: cost}
	}

	return rateToken{
		tokenCost: cost,
		bucket:    l.bucket,
	}.release, nil
}