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

improve document for the xrayaws package #474

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions xray/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package xray provides a simple API for tracing and monitoring AWS X-Ray.
package xray
11 changes: 11 additions & 0 deletions xrayaws-v2/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Package xrayaws provides AWS X-Ray tracing for AWS SDK for Go v2.
//
// cfg, err := config.LoadDefaultConfig(ctx, xrayaws.WithXRay())
// if err != nil {
// panic(err)
// }
// svc := dynamodb.NewFromConfig(cfg)
//
// // the following requests are traced.
// dynamo.ListTables(ctx, &dynamodb.ListTablesInput{})
package xrayaws
3 changes: 2 additions & 1 deletion xrayaws-v2/whitelist/whitelist.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package whitelist provides whitelist of parameters for aws api.
package whitelist

import (
Expand All @@ -24,7 +25,7 @@ type Operation struct {
ResponseParameters []string `json:"response_parameters,omitempty"`
}

// Descriptor is a rule for recording the paremeter.
// Descriptor is a rule for recording the parameter.
type Descriptor struct {
Map bool `json:"map,omitempty"`
GetKeys bool `json:"get_keys"`
Expand Down
9 changes: 9 additions & 0 deletions xrayaws/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Package xrayaws provides AWS X-Ray tracing for AWS SDK for Go v1.
//
// sess := session.Must(session.NewSession())
// svc := dynamodb.New(sess)
// xrayaws.Client(svc.Client) // install AWS X-Ray tracer
//
// // the following requests are traced.
// dynamo.ListTablesWithContext(ctx, &dynamodb.ListTablesInput{})
package xrayaws
3 changes: 2 additions & 1 deletion xrayaws/whitelist/whitelist.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package whitelist provides the whitelist of parameters for aws api.
package whitelist

import (
Expand All @@ -24,7 +25,7 @@ type Operation struct {
ResponseParameters []string `json:"response_parameters,omitempty"`
}

// Descriptor is a rule for recording the paremeter.
// Descriptor is a rule for recording the parameter.
type Descriptor struct {
Map bool `json:"map,omitempty"`
GetKeys bool `json:"get_keys"`
Expand Down