Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
9429ab14
Unverified
Commit
9429ab14
authored
Mar 19, 2021
by
Felix Lange
Committed by
GitHub
Mar 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/devp2p: add flag for AWS region (#22537)
parent
d3040a80
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
dns_route53.go
cmd/devp2p/dns_route53.go
+7
-1
dnscmd.go
cmd/devp2p/dnscmd.go
+6
-1
No files found.
cmd/devp2p/dns_route53.go
View file @
9429ab14
...
...
@@ -59,6 +59,11 @@ var (
Name
:
"zone-id"
,
Usage
:
"Route53 Zone ID"
,
}
route53RegionFlag
=
cli
.
StringFlag
{
Name
:
"aws-region"
,
Usage
:
"AWS Region"
,
Value
:
"eu-central-1"
,
}
)
type
route53Client
struct
{
...
...
@@ -76,13 +81,14 @@ func newRoute53Client(ctx *cli.Context) *route53Client {
akey
:=
ctx
.
String
(
route53AccessKeyFlag
.
Name
)
asec
:=
ctx
.
String
(
route53AccessSecretFlag
.
Name
)
if
akey
==
""
||
asec
==
""
{
exit
(
fmt
.
Errorf
(
"need Route53 Access Key ID and secret proceed"
))
exit
(
fmt
.
Errorf
(
"need Route53 Access Key ID and secret
to
proceed"
))
}
creds
:=
aws
.
NewCredentialsCache
(
credentials
.
NewStaticCredentialsProvider
(
akey
,
asec
,
""
))
cfg
,
err
:=
config
.
LoadDefaultConfig
(
context
.
Background
(),
config
.
WithCredentialsProvider
(
creds
))
if
err
!=
nil
{
exit
(
fmt
.
Errorf
(
"can't initialize AWS configuration: %v"
,
err
))
}
cfg
.
Region
=
ctx
.
String
(
route53RegionFlag
.
Name
)
return
&
route53Client
{
api
:
route53
.
NewFromConfig
(
cfg
),
zoneID
:
ctx
.
String
(
route53ZoneIDFlag
.
Name
),
...
...
cmd/devp2p/dnscmd.go
View file @
9429ab14
...
...
@@ -77,7 +77,12 @@ var (
Usage
:
"Deploy DNS TXT records to Amazon Route53"
,
ArgsUsage
:
"<tree-directory>"
,
Action
:
dnsToRoute53
,
Flags
:
[]
cli
.
Flag
{
route53AccessKeyFlag
,
route53AccessSecretFlag
,
route53ZoneIDFlag
},
Flags
:
[]
cli
.
Flag
{
route53AccessKeyFlag
,
route53AccessSecretFlag
,
route53ZoneIDFlag
,
route53RegionFlag
,
},
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment