Make container logs available
Store and retrieve container logs using Cloudwatch Logs
This commit is contained in:
committed by
Robbie Zhang
parent
0a1acbc78e
commit
803b0218c8
@@ -5,15 +5,18 @@ import (
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatchlogs/cloudwatchlogsiface"
|
||||
"github.com/aws/aws-sdk-go/service/ecs"
|
||||
"github.com/aws/aws-sdk-go/service/ecs/ecsiface"
|
||||
)
|
||||
|
||||
// Client communicates with the regional AWS Fargate service.
|
||||
type Client struct {
|
||||
region string
|
||||
svc *ecs.ECS
|
||||
api ecsiface.ECSAPI
|
||||
region string
|
||||
svc *ecs.ECS
|
||||
api ecsiface.ECSAPI
|
||||
logsapi cloudwatchlogsiface.CloudWatchLogsAPI
|
||||
}
|
||||
|
||||
var client *Client
|
||||
@@ -42,6 +45,9 @@ func newClient(region string) (*Client, error) {
|
||||
client.svc = ecs.New(session)
|
||||
client.api = client.svc
|
||||
|
||||
// Create the CloudWatch service client.
|
||||
client.logsapi = cloudwatchlogs.New(session)
|
||||
|
||||
log.Println("Created Fargate service client.")
|
||||
|
||||
return &client, nil
|
||||
|
||||
Reference in New Issue
Block a user