Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2/logging: add support for S3 logstreaming #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zehauser
Copy link

We recently added support for S3 logstreaming endpoints to our API. This involved adding several new fields on the GET LogstreamConfiguration and PUT LogstreamConfiguration endpoints (and a new destinationType, "s3"), plus a new AWSExternalID resource and two new endpoints related to it.

This commit updates the Go client library to reflect all of these changes.

Updates tailscale/corp#24533

We recently added support for S3 logstreaming endpoints to our API. This
involved adding several new fields on the GET LogstreamConfiguration and
PUT LogstreamConfiguration endpoints (and a new destinationType, "s3"),
plus a new AWSExternalID resource and two new endpoints related to it.

This commit updates the Go client library to reflect all of these changes.

Updates tailscale/corp#24533

Signed-off-by: Zach Hauser <[email protected]>
// CreateOrGetAwsExternalId gets an AWS External ID that Tailscale can use to stream logs to
// a LogstreamS3Endpoint using S3RoleARNAuthentication, creating a new one for this tailnet
// when necessary.
func (lr *LoggingResource) CreateOrGetAwsExternalId(ctx context.Context, request CreateOrGetAwsExternalIdRequest) (*AWSExternalID, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just make reusable a parameter on this function, so that callers don't have to mess with constructing a CreateOrGetAwsExternalIdRequest. In general, we follow that sort of pattern, as seen here.

Copy link
Contributor

@oxtoacart oxtoacart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, just a comment about the style for passing parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants