github.com/blend/go-sdk@v1.20220411.3/configutil/duration_source.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package configutil 9 10 import ( 11 "context" 12 "time" 13 ) 14 15 // DurationSource is a type that can return a time.Duration value. 16 type DurationSource interface { 17 // Duration should return a time.Duration if the source has a given value. 18 // It should return nil if the value is not present. 19 // It should return an error if there was a problem fetching the value. 20 Duration(context.Context) (*time.Duration, error) 21 }