Skip to content

Commit aed92bf

Browse files
committed
Fix naming
1 parent 0055fbb commit aed92bf

File tree

9 files changed

+104
-59
lines changed

9 files changed

+104
-59
lines changed

.goreleaser.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
builds:
2-
- id: "arkd"
3-
main: ./cmd/arkd
2+
- id: "coordinatord"
3+
main: ./cmd/coordinatord
44
ldflags:
55
- -s -X 'main.version={{.Version}}' -X 'main.commit={{.Commit}}' -X 'main.date={{.Date}}'
66
goos:
@@ -9,7 +9,7 @@ builds:
99
goarch:
1010
- amd64
1111
- arm64
12-
binary: arkd
12+
binary: coordinatord
1313

1414
## flag the semver v**.**.**-<tag>.* as pre-release on Github
1515
release:
@@ -25,11 +25,11 @@ changelog:
2525
use: github-native
2626

2727
archives:
28-
- id: arkd
28+
- id: coordinatord
2929
format: binary
3030
builds:
31-
- arkd
32-
name_template: "arkd-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
31+
- coordinatord
32+
name_template: "coordinatord-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
3333

3434
dockers:
3535
###########################
@@ -38,12 +38,12 @@ dockers:
3838

3939
#amd64
4040
- image_templates:
41-
- "ghcr.io/ark-network/arkd:{{ .Tag }}-amd64"
41+
- "ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64"
4242
# push always either release or prerelease with a docker tag with the semver only
4343
skip_push: "false"
4444
use: buildx
4545
ids:
46-
- arkd
46+
- coordinatord
4747
dockerfile: goreleaser.Dockerfile
4848
# GOOS of the built binaries/packages that should be used.
4949
goos: linux
@@ -54,19 +54,19 @@ dockers:
5454
- "--platform=linux/amd64"
5555
- "--pull"
5656
- "--label=org.opencontainers.image.created={{.Date}}"
57-
- "--label=org.opencontainers.image.title=arkd"
57+
- "--label=org.opencontainers.image.title=coordinatord"
5858
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
5959
- "--label=org.opencontainers.image.version={{.Version}}"
6060
- "--build-arg=VERSION={{.Version}}"
6161
- "--build-arg=COMMIT={{.Commit}}"
6262
- "--build-arg=DATE={{.Date}}"
6363
- image_templates:
64-
- "ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8"
64+
- "ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8"
6565
# push always either release or prerelease with a docker tag with the semver only
6666
skip_push: "false"
6767
use: buildx
6868
ids:
69-
- arkd
69+
- coordinatord
7070
dockerfile: goreleaser.Dockerfile
7171
# GOOS of the built binaries/packages that should be used.
7272
goos: linux
@@ -77,23 +77,23 @@ dockers:
7777
- "--platform=linux/arm64/v8"
7878
- "--pull"
7979
- "--label=org.opencontainers.image.created={{.Date}}"
80-
- "--label=org.opencontainers.image.title=arkd"
80+
- "--label=org.opencontainers.image.title=coordinatord"
8181
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
8282
- "--label=org.opencontainers.image.version={{.Version}}"
8383
- "--build-arg=VERSION={{.Version}}"
8484
- "--build-arg=COMMIT={{.Commit}}"
8585
- "--build-arg=DATE={{.Date}}"
8686

8787
docker_manifests:
88-
- name_template: ghcr.io/ark-network/arkd:{{ .Tag }}
88+
- name_template: ghcr.io/ark-network/coordinatord:{{ .Tag }}
8989
image_templates:
90-
- ghcr.io/ark-network/arkd:{{ .Tag }}-amd64
91-
- ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8
90+
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64
91+
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8
9292
skip_push: "false"
9393

94-
- name_template: ghcr.io/ark-network/arkd:latest
94+
- name_template: ghcr.io/ark-network/coordinatord:latest
9595
image_templates:
96-
- ghcr.io/ark-network/arkd:{{ .Tag }}-amd64
97-
- ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8
96+
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64
97+
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8
9898
skip_push: auto
9999

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ WORKDIR /app
1111

1212
COPY . .
1313

14-
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${COMMIT}' -X 'main.Commit=${COMMIT}' -X 'main.Date=${COMMIT}'" -o bin/arkd cmd/arkd/main.go
14+
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${COMMIT}' -X 'main.Commit=${COMMIT}' -X 'main.Date=${COMMIT}'" -o bin/coordinatord cmd/coordinatord/main.go
1515

16-
# Second image, running the arkd executable
16+
# Second image, running the coordinatord executable
1717
FROM debian:buster-slim
1818

1919
# $USER name, and data $DIR to be used in the 'final' image
@@ -31,11 +31,11 @@ RUN adduser --disabled-password \
3131
"$USER"
3232
USER $USER
3333

34-
# Prevents 'VOLUME $DIR/.arkd/' being created as owned by 'root'
35-
RUN mkdir -p "$DIR/.arkd/"
34+
# Prevents 'VOLUME $DIR/.coordinatord/' being created as owned by 'root'
35+
RUN mkdir -p "$DIR/.coordinatord/"
3636

37-
# Expose volume containing all 'arkd' data
38-
VOLUME $DIR/.arkd/
37+
# Expose volume containing all 'coordinatord' data
38+
VOLUME $DIR/.coordinatord/
3939

40-
ENTRYPOINT [ "arkd" ]
40+
ENTRYPOINT [ "coordinatord" ]
4141

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## build: build for all platforms
44
build:
5-
@echo "Building arkd binary..."
5+
@echo "Building coordinatord binary..."
66
@bash ./scripts/build
77

88
## clean: cleans the binary
@@ -32,8 +32,8 @@ lint:
3232

3333
## run: run in dev mode
3434
run: clean
35-
@echo "Running arkd in dev mode..."
36-
@go run ./cmd/arkd
35+
@echo "Running coordinatord in dev mode..."
36+
@go run ./cmd/coordinatord
3737

3838
## test: runs unit and component tests
3939
test:

api-spec/protobuf/arkd/v1/service.proto

Lines changed: 0 additions & 23 deletions
This file was deleted.

api-spec/protobuf/buf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: v1
2-
name: buf.build/ark-network/ark
2+
name: buf.build/ark-network/coordinator
33
deps:
44
- buf.build/googleapis/googleapis
55
breaking:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
syntax = "proto3";
2+
3+
package coordinator.v1;
4+
5+
import "google/api/annotations.proto";
6+
7+
service CoordinatorService {
8+
rpc RegisterPayment(RegisterPaymentRequest) returns (RegisterPaymentResponse) {
9+
option (google.api.http) = {
10+
post: "/v1/payment/register"
11+
body: "*"
12+
};
13+
};
14+
rpc FinalizePayment(FinalizePaymentRequest) returns (FinalizePaymentResponse) {
15+
option (google.api.http) = {
16+
post: "/v1/payment/finalize"
17+
body: "*"
18+
};
19+
};
20+
rpc ListPoolTransactions(ListPoolTransactionsRequest) returns (ListPoolTransactionsResponse) {
21+
option (google.api.http) = {
22+
post: "/v1/pools"
23+
body: "*"
24+
};
25+
};
26+
rpc GetPoolTransaction(GetPoolTransactionRequest) returns (GetPoolTransactionResponse) {
27+
option (google.api.http) = {
28+
get: "/v1/pool/{txid}"
29+
};
30+
};
31+
}
32+
33+
message RegisterPaymentRequest {
34+
repeated Input inputs = 1;
35+
repeated Output outputs = 2;
36+
}
37+
message RegisterPaymentResponse {
38+
string vtx = 1;
39+
}
40+
41+
message FinalizePaymentRequest {
42+
string signed_vtx = 1;
43+
}
44+
message FinalizePaymentResponse {}
45+
46+
message ListPoolTransactionsRequest {
47+
int64 start = 1;
48+
int64 end = 2;
49+
}
50+
message ListPoolTransactionsResponse {
51+
repeated string txs = 1;
52+
}
53+
54+
message GetPoolTransactionRequest {
55+
string txid = 1;
56+
}
57+
message GetPoolTransactionResponse {
58+
string txhex = 1;
59+
}
60+
61+
message Input {
62+
string txid = 1;
63+
uint32 vout = 2;
64+
}
65+
message Output {
66+
string pubkey = 1;
67+
uint64 amount = 2;
68+
}
File renamed without changes.

goreleaser.Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COPY . .
99
RUN set -ex \
1010
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=amd64; fi \
1111
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=arm64; fi \
12-
&& mv "arkd-linux-$TARGETPLATFORM" /usr/local/bin/arkd
12+
&& mv "coordinatord-linux-$TARGETPLATFORM" /usr/local/bin/coordinatord
1313

1414

1515
# $USER name, and data $DIR to be used in the 'final' image
@@ -25,11 +25,11 @@ RUN adduser --disabled-password \
2525
"$USER"
2626
USER $USER
2727

28-
# Prevents 'VOLUME $DIR/.arkd/' being created as owned by 'root'
29-
RUN mkdir -p "$DIR/.arkd/"
28+
# Prevents 'VOLUME $DIR/.coordinatord/' being created as owned by 'root'
29+
RUN mkdir -p "$DIR/.coordinatord/"
3030

31-
# Expose volume containing all arkd data
32-
VOLUME $DIR/.arkd/
31+
# Expose volume containing all coordinatord data
32+
VOLUME $DIR/.coordinatord/
3333

34-
ENTRYPOINT [ "arkd" ]
34+
ENTRYPOINT [ "coordinatord" ]
3535

scripts/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ ARCH=$(eval "go env GOARCH")
1313

1414
pushd $PARENT_PATH
1515
mkdir -p build
16-
GO111MODULE=on go build -ldflags="-s -w" -o build/arkd-$OS-$ARCH cmd/arkd/main.go
16+
GO111MODULE=on go build -ldflags="-s -w" -o build/coordinatord-$OS-$ARCH cmd/coordinatord/main.go
1717
popd
1818

0 commit comments

Comments
 (0)