Documentation
¶
Index ¶
- func DocumentMerge(a, b any, opts ...func(*mergo.Config)) (map[string]interface{}, error)
- func GetHttpFile(ctx context.Context, uri string) ([]byte, error)
- func GetHttpFileReader(ctx context.Context, uri string) (io.ReadCloser, error)
- func IsFilePathExists(filePath string) (bool, error)
- func RetryExponentialBackoff(attempts int, initial time.Duration, f func() error) error
- func WriteFileUniqueLine(filepath string, data []byte, perm fs.FileMode) error
- func WriteFileWithDir(filePath string, data []byte, perm fs.FileMode) error
- func WriteFileWithDirFromReader(path string, reader io.Reader, perm fs.FileMode) error
- type EC2API
- type EC2Client
- type EniInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DocumentMerge ¶
DocumentMerge merges two arguments using their marshalled json representations and returns the resulting data in a `map[string]interface{}`
func GetHttpFileReader ¶
func IsFilePathExists ¶
IsFilePathExists checks whether specific file path exists
func RetryExponentialBackoff ¶
func WriteFileUniqueLine ¶ added in v1.0.4
WriteFileUniqueLine creates the dir and file if it doesn't exist and writes the input data to the file If the file already exist, the input data will only be appended if it doesn't exist in the file
func WriteFileWithDir ¶
Wraps os.WriteFile to automatically create parent directories such that the caller does not need to ensure the existence of the file's directory
Types ¶
type EC2API ¶
type EC2API interface {
DescribeInstanceTypes(ctx context.Context, params *ec2.DescribeInstanceTypesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTypesOutput, error)
}
type EC2Client ¶
func (*EC2Client) DescribeInstanceTypes ¶
func (c *EC2Client) DescribeInstanceTypes(ctx context.Context, params *ec2.DescribeInstanceTypesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTypesOutput, error)
Click to show internal directories.
Click to hide internal directories.