Replace minio-go with aws-sdk-go for s3-compatible log backend (#670)

* Logs should support specifying region when using S3-compatible object store

* Use aws-sdk-go client for s3 backed logstore

* fixes vendor with aws-sdk-go dependencies
This commit is contained in:
Gerardo Viedma
2018-01-10 17:44:04 +00:00
committed by Reed Allman
parent 930d1e8dcc
commit 60d2e92c9a
2817 changed files with 1881133 additions and 33102 deletions

4677
vendor/github.com/aws/aws-sdk-go/service/dax/api.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,148 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package daxiface provides an interface to enable mocking the Amazon DynamoDB Accelerator (DAX) service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package daxiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/dax"
)
// DAXAPI provides an interface to enable mocking the
// dax.DAX service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // Amazon DynamoDB Accelerator (DAX).
// func myFunc(svc daxiface.DAXAPI) bool {
// // Make svc.CreateCluster request
// }
//
// func main() {
// sess := session.New()
// svc := dax.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockDAXClient struct {
// daxiface.DAXAPI
// }
// func (m *mockDAXClient) CreateCluster(input *dax.CreateClusterInput) (*dax.CreateClusterOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockDAXClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type DAXAPI interface {
CreateCluster(*dax.CreateClusterInput) (*dax.CreateClusterOutput, error)
CreateClusterWithContext(aws.Context, *dax.CreateClusterInput, ...request.Option) (*dax.CreateClusterOutput, error)
CreateClusterRequest(*dax.CreateClusterInput) (*request.Request, *dax.CreateClusterOutput)
CreateParameterGroup(*dax.CreateParameterGroupInput) (*dax.CreateParameterGroupOutput, error)
CreateParameterGroupWithContext(aws.Context, *dax.CreateParameterGroupInput, ...request.Option) (*dax.CreateParameterGroupOutput, error)
CreateParameterGroupRequest(*dax.CreateParameterGroupInput) (*request.Request, *dax.CreateParameterGroupOutput)
CreateSubnetGroup(*dax.CreateSubnetGroupInput) (*dax.CreateSubnetGroupOutput, error)
CreateSubnetGroupWithContext(aws.Context, *dax.CreateSubnetGroupInput, ...request.Option) (*dax.CreateSubnetGroupOutput, error)
CreateSubnetGroupRequest(*dax.CreateSubnetGroupInput) (*request.Request, *dax.CreateSubnetGroupOutput)
DecreaseReplicationFactor(*dax.DecreaseReplicationFactorInput) (*dax.DecreaseReplicationFactorOutput, error)
DecreaseReplicationFactorWithContext(aws.Context, *dax.DecreaseReplicationFactorInput, ...request.Option) (*dax.DecreaseReplicationFactorOutput, error)
DecreaseReplicationFactorRequest(*dax.DecreaseReplicationFactorInput) (*request.Request, *dax.DecreaseReplicationFactorOutput)
DeleteCluster(*dax.DeleteClusterInput) (*dax.DeleteClusterOutput, error)
DeleteClusterWithContext(aws.Context, *dax.DeleteClusterInput, ...request.Option) (*dax.DeleteClusterOutput, error)
DeleteClusterRequest(*dax.DeleteClusterInput) (*request.Request, *dax.DeleteClusterOutput)
DeleteParameterGroup(*dax.DeleteParameterGroupInput) (*dax.DeleteParameterGroupOutput, error)
DeleteParameterGroupWithContext(aws.Context, *dax.DeleteParameterGroupInput, ...request.Option) (*dax.DeleteParameterGroupOutput, error)
DeleteParameterGroupRequest(*dax.DeleteParameterGroupInput) (*request.Request, *dax.DeleteParameterGroupOutput)
DeleteSubnetGroup(*dax.DeleteSubnetGroupInput) (*dax.DeleteSubnetGroupOutput, error)
DeleteSubnetGroupWithContext(aws.Context, *dax.DeleteSubnetGroupInput, ...request.Option) (*dax.DeleteSubnetGroupOutput, error)
DeleteSubnetGroupRequest(*dax.DeleteSubnetGroupInput) (*request.Request, *dax.DeleteSubnetGroupOutput)
DescribeClusters(*dax.DescribeClustersInput) (*dax.DescribeClustersOutput, error)
DescribeClustersWithContext(aws.Context, *dax.DescribeClustersInput, ...request.Option) (*dax.DescribeClustersOutput, error)
DescribeClustersRequest(*dax.DescribeClustersInput) (*request.Request, *dax.DescribeClustersOutput)
DescribeDefaultParameters(*dax.DescribeDefaultParametersInput) (*dax.DescribeDefaultParametersOutput, error)
DescribeDefaultParametersWithContext(aws.Context, *dax.DescribeDefaultParametersInput, ...request.Option) (*dax.DescribeDefaultParametersOutput, error)
DescribeDefaultParametersRequest(*dax.DescribeDefaultParametersInput) (*request.Request, *dax.DescribeDefaultParametersOutput)
DescribeEvents(*dax.DescribeEventsInput) (*dax.DescribeEventsOutput, error)
DescribeEventsWithContext(aws.Context, *dax.DescribeEventsInput, ...request.Option) (*dax.DescribeEventsOutput, error)
DescribeEventsRequest(*dax.DescribeEventsInput) (*request.Request, *dax.DescribeEventsOutput)
DescribeParameterGroups(*dax.DescribeParameterGroupsInput) (*dax.DescribeParameterGroupsOutput, error)
DescribeParameterGroupsWithContext(aws.Context, *dax.DescribeParameterGroupsInput, ...request.Option) (*dax.DescribeParameterGroupsOutput, error)
DescribeParameterGroupsRequest(*dax.DescribeParameterGroupsInput) (*request.Request, *dax.DescribeParameterGroupsOutput)
DescribeParameters(*dax.DescribeParametersInput) (*dax.DescribeParametersOutput, error)
DescribeParametersWithContext(aws.Context, *dax.DescribeParametersInput, ...request.Option) (*dax.DescribeParametersOutput, error)
DescribeParametersRequest(*dax.DescribeParametersInput) (*request.Request, *dax.DescribeParametersOutput)
DescribeSubnetGroups(*dax.DescribeSubnetGroupsInput) (*dax.DescribeSubnetGroupsOutput, error)
DescribeSubnetGroupsWithContext(aws.Context, *dax.DescribeSubnetGroupsInput, ...request.Option) (*dax.DescribeSubnetGroupsOutput, error)
DescribeSubnetGroupsRequest(*dax.DescribeSubnetGroupsInput) (*request.Request, *dax.DescribeSubnetGroupsOutput)
IncreaseReplicationFactor(*dax.IncreaseReplicationFactorInput) (*dax.IncreaseReplicationFactorOutput, error)
IncreaseReplicationFactorWithContext(aws.Context, *dax.IncreaseReplicationFactorInput, ...request.Option) (*dax.IncreaseReplicationFactorOutput, error)
IncreaseReplicationFactorRequest(*dax.IncreaseReplicationFactorInput) (*request.Request, *dax.IncreaseReplicationFactorOutput)
ListTags(*dax.ListTagsInput) (*dax.ListTagsOutput, error)
ListTagsWithContext(aws.Context, *dax.ListTagsInput, ...request.Option) (*dax.ListTagsOutput, error)
ListTagsRequest(*dax.ListTagsInput) (*request.Request, *dax.ListTagsOutput)
RebootNode(*dax.RebootNodeInput) (*dax.RebootNodeOutput, error)
RebootNodeWithContext(aws.Context, *dax.RebootNodeInput, ...request.Option) (*dax.RebootNodeOutput, error)
RebootNodeRequest(*dax.RebootNodeInput) (*request.Request, *dax.RebootNodeOutput)
TagResource(*dax.TagResourceInput) (*dax.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *dax.TagResourceInput, ...request.Option) (*dax.TagResourceOutput, error)
TagResourceRequest(*dax.TagResourceInput) (*request.Request, *dax.TagResourceOutput)
UntagResource(*dax.UntagResourceInput) (*dax.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *dax.UntagResourceInput, ...request.Option) (*dax.UntagResourceOutput, error)
UntagResourceRequest(*dax.UntagResourceInput) (*request.Request, *dax.UntagResourceOutput)
UpdateCluster(*dax.UpdateClusterInput) (*dax.UpdateClusterOutput, error)
UpdateClusterWithContext(aws.Context, *dax.UpdateClusterInput, ...request.Option) (*dax.UpdateClusterOutput, error)
UpdateClusterRequest(*dax.UpdateClusterInput) (*request.Request, *dax.UpdateClusterOutput)
UpdateParameterGroup(*dax.UpdateParameterGroupInput) (*dax.UpdateParameterGroupOutput, error)
UpdateParameterGroupWithContext(aws.Context, *dax.UpdateParameterGroupInput, ...request.Option) (*dax.UpdateParameterGroupOutput, error)
UpdateParameterGroupRequest(*dax.UpdateParameterGroupInput) (*request.Request, *dax.UpdateParameterGroupOutput)
UpdateSubnetGroup(*dax.UpdateSubnetGroupInput) (*dax.UpdateSubnetGroupOutput, error)
UpdateSubnetGroupWithContext(aws.Context, *dax.UpdateSubnetGroupInput, ...request.Option) (*dax.UpdateSubnetGroupOutput, error)
UpdateSubnetGroupRequest(*dax.UpdateSubnetGroupInput) (*request.Request, *dax.UpdateSubnetGroupOutput)
}
var _ DAXAPI = (*dax.DAX)(nil)

33
vendor/github.com/aws/aws-sdk-go/service/dax/doc.go generated vendored Normal file
View File

@@ -0,0 +1,33 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package dax provides the client and types for making API
// requests to Amazon DynamoDB Accelerator (DAX).
//
// DAX is a managed caching service engineered for Amazon DynamoDB. DAX dramatically
// speeds up database reads by caching frequently-accessed data from DynamoDB,
// so applications can access that data with sub-millisecond latency. You can
// create a DAX cluster easily, using the AWS Management Console. With a few
// simple modifications to your code, your application can begin taking advantage
// of the DAX cluster and realize significant improvements in read performance.
//
// See https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19 for more information on this service.
//
// See dax package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/dax/
//
// Using the Client
//
// To contact Amazon DynamoDB Accelerator (DAX) with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon DynamoDB Accelerator (DAX) client DAX for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/dax/#New
package dax

160
vendor/github.com/aws/aws-sdk-go/service/dax/errors.go generated vendored Normal file
View File

@@ -0,0 +1,160 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package dax
const (
// ErrCodeClusterAlreadyExistsFault for service response error code
// "ClusterAlreadyExistsFault".
//
// You already have a DAX cluster with the given identifier.
ErrCodeClusterAlreadyExistsFault = "ClusterAlreadyExistsFault"
// ErrCodeClusterNotFoundFault for service response error code
// "ClusterNotFoundFault".
//
// The requested cluster ID does not refer to an existing DAX cluster.
ErrCodeClusterNotFoundFault = "ClusterNotFoundFault"
// ErrCodeClusterQuotaForCustomerExceededFault for service response error code
// "ClusterQuotaForCustomerExceededFault".
//
// You have attempted to exceed the maximum number of DAX clusters for your
// AWS account.
ErrCodeClusterQuotaForCustomerExceededFault = "ClusterQuotaForCustomerExceededFault"
// ErrCodeInsufficientClusterCapacityFault for service response error code
// "InsufficientClusterCapacityFault".
//
// There are not enough system resources to create the cluster you requested
// (or to resize an already-existing cluster).
ErrCodeInsufficientClusterCapacityFault = "InsufficientClusterCapacityFault"
// ErrCodeInvalidARNFault for service response error code
// "InvalidARNFault".
//
// The Amazon Resource Name (ARN) supplied in the request is not valid.
ErrCodeInvalidARNFault = "InvalidARNFault"
// ErrCodeInvalidClusterStateFault for service response error code
// "InvalidClusterStateFault".
//
// The requested DAX cluster is not in the available state.
ErrCodeInvalidClusterStateFault = "InvalidClusterStateFault"
// ErrCodeInvalidParameterCombinationException for service response error code
// "InvalidParameterCombinationException".
//
// Two or more incompatible parameters were specified.
ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"
// ErrCodeInvalidParameterGroupStateFault for service response error code
// "InvalidParameterGroupStateFault".
//
// One or more parameters in a parameter group are in an invalid state.
ErrCodeInvalidParameterGroupStateFault = "InvalidParameterGroupStateFault"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValueException".
//
// The value for a parameter is invalid.
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
// ErrCodeInvalidSubnet for service response error code
// "InvalidSubnet".
//
// An invalid subnet identifier was specified.
ErrCodeInvalidSubnet = "InvalidSubnet"
// ErrCodeInvalidVPCNetworkStateFault for service response error code
// "InvalidVPCNetworkStateFault".
//
// The VPC network is in an invalid state.
ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault"
// ErrCodeNodeNotFoundFault for service response error code
// "NodeNotFoundFault".
//
// None of the nodes in the cluster have the given node ID.
ErrCodeNodeNotFoundFault = "NodeNotFoundFault"
// ErrCodeNodeQuotaForClusterExceededFault for service response error code
// "NodeQuotaForClusterExceededFault".
//
// You have attempted to exceed the maximum number of nodes for a DAX cluster.
ErrCodeNodeQuotaForClusterExceededFault = "NodeQuotaForClusterExceededFault"
// ErrCodeNodeQuotaForCustomerExceededFault for service response error code
// "NodeQuotaForCustomerExceededFault".
//
// You have attempted to exceed the maximum number of nodes for your AWS account.
ErrCodeNodeQuotaForCustomerExceededFault = "NodeQuotaForCustomerExceededFault"
// ErrCodeParameterGroupAlreadyExistsFault for service response error code
// "ParameterGroupAlreadyExistsFault".
//
// The specified parameter group already exists.
ErrCodeParameterGroupAlreadyExistsFault = "ParameterGroupAlreadyExistsFault"
// ErrCodeParameterGroupNotFoundFault for service response error code
// "ParameterGroupNotFoundFault".
//
// The specified parameter group does not exist.
ErrCodeParameterGroupNotFoundFault = "ParameterGroupNotFoundFault"
// ErrCodeParameterGroupQuotaExceededFault for service response error code
// "ParameterGroupQuotaExceededFault".
//
// You have attempted to exceed the maximum number of parameter groups.
ErrCodeParameterGroupQuotaExceededFault = "ParameterGroupQuotaExceededFault"
// ErrCodeSubnetGroupAlreadyExistsFault for service response error code
// "SubnetGroupAlreadyExistsFault".
//
// The specified subnet group already exists.
ErrCodeSubnetGroupAlreadyExistsFault = "SubnetGroupAlreadyExistsFault"
// ErrCodeSubnetGroupInUseFault for service response error code
// "SubnetGroupInUseFault".
//
// The specified subnet group is currently in use.
ErrCodeSubnetGroupInUseFault = "SubnetGroupInUseFault"
// ErrCodeSubnetGroupNotFoundFault for service response error code
// "SubnetGroupNotFoundFault".
//
// The requested subnet group name does not refer to an existing subnet group.
ErrCodeSubnetGroupNotFoundFault = "SubnetGroupNotFoundFault"
// ErrCodeSubnetGroupQuotaExceededFault for service response error code
// "SubnetGroupQuotaExceededFault".
//
// The request cannot be processed because it would exceed the allowed number
// of subnets in a subnet group.
ErrCodeSubnetGroupQuotaExceededFault = "SubnetGroupQuotaExceededFault"
// ErrCodeSubnetInUse for service response error code
// "SubnetInUse".
//
// The requested subnet is being used by another subnet group.
ErrCodeSubnetInUse = "SubnetInUse"
// ErrCodeSubnetQuotaExceededFault for service response error code
// "SubnetQuotaExceededFault".
//
// The request cannot be processed because it would exceed the allowed number
// of subnets in a subnet group.
ErrCodeSubnetQuotaExceededFault = "SubnetQuotaExceededFault"
// ErrCodeTagNotFoundFault for service response error code
// "TagNotFoundFault".
//
// The tag does not exist.
ErrCodeTagNotFoundFault = "TagNotFoundFault"
// ErrCodeTagQuotaPerResourceExceeded for service response error code
// "TagQuotaPerResourceExceeded".
//
// You have exceeded the maximum number of tags for this DAX cluster.
ErrCodeTagQuotaPerResourceExceeded = "TagQuotaPerResourceExceeded"
)

View File

@@ -0,0 +1,95 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package dax
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// DAX provides the API operation methods for making requests to
// Amazon DynamoDB Accelerator (DAX). See this package's package overview docs
// for details on the service.
//
// DAX methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type DAX struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "dax" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the DAX client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a DAX client from just a session.
// svc := dax.New(mySession)
//
// // Create a DAX client with additional configuration
// svc := dax.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *DAX {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DAX {
svc := &DAX{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2017-04-19",
JSONVersion: "1.1",
TargetPrefix: "AmazonDAXV3",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a DAX operation and runs any
// custom request initialization.
func (c *DAX) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}