Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit 77b73a2

Browse files
committed
chore: Rename project to go-isc-dhcp (#13)
1 parent a41cf12 commit 77b73a2

File tree

25 files changed

+257
-203
lines changed

25 files changed

+257
-203
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# godhcpd
1+
# go-isc-dhcp
22

33
Management daemons and CLIs for the ISC DHCP server and client.
44

55
## Overview
66

7-
`godhcpd` is a collection of management daemons and CLIs for the ISC DHCP server and client. The ISC DHCP server and client are built of two main components:
7+
`go-isc-dhcp` is a collection of management daemons and CLIs for the ISC DHCP server and client. The ISC DHCP server and client are built of two main components:
88

99
- `dhcpd`, a DHCP server
1010
- `dhclient`, a DHCP client
1111

12-
In a similar way, `godhcpd` is built of multiple components. The components are:
12+
In a similar way, `go-isc-dhcp` is built of multiple components. The components are:
1313

1414
- `dhcpdd`, an ISC DHCP server management daemon with a gRPC interface
1515
- `dhclientd`, an ISC DHCP client management daemon with a gRPC interface
@@ -20,7 +20,7 @@ In a similar way, `godhcpd` is built of multiple components. The components are:
2020

2121
## Installation
2222

23-
A Go package [is available](https://godoc.org/github.com/pojntfx/godhcpd). In order to use it, you have to `go generate` it first.
23+
A Go package [is available](https://godoc.org/github.com/pojntfx/go-isc-dhcp). In order to use it, you have to `go generate` it first.
2424

2525
## Usage
2626

@@ -37,7 +37,7 @@ You may also set the flags by setting env variables in the format `DHCPDD_[FLAG]
3737
dhcpdd is the ISC DHCP server management daemon.
3838

3939
Find more information at:
40-
https://pojntfx.github.io/godhcpd/
40+
https://pojntfx.github.io/go-isc-dhcp/
4141

4242
Usage:
4343
dhcpdd [flags]
@@ -57,7 +57,7 @@ You may also set the flags by setting env variables in the format `DHCLIENTD_[FL
5757
dhclientd is the ISC DHCP client management daemon.
5858

5959
Find more information at:
60-
https://pojntfx.github.io/godhcpd/
60+
https://pojntfx.github.io/go-isc-dhcp/
6161

6262
Usage:
6363
dhclientd [flags]
@@ -81,7 +81,7 @@ You may also set the flags by setting env variables in the format `DHCPD_[FLAG]`
8181
dhcpdctl manages dhcpdd, the ISC DHCP server management daemon.
8282

8383
Find more information at:
84-
https://pojntfx.github.io/godhcpd/
84+
https://pojntfx.github.io/go-isc-dhcp/
8585

8686
Usage:
8787
dhcpdctl [command]
@@ -107,7 +107,7 @@ You may also set the flags by setting env variables in the format `DHCLIENT_[FLA
107107
dhclientctl manages dhclientd, the ISC DHCP client management daemon.
108108

109109
Find more information at:
110-
https://pojntfx.github.io/godhcpd/
110+
https://pojntfx.github.io/go-isc-dhcp/
111111

112112
Usage:
113113
dhclientctl [command]
@@ -126,6 +126,6 @@ Use "dhclientctl [command] --help" for more information about a command.
126126

127127
## License
128128

129-
godhcpd (c) 2020 Felix Pojtinger
129+
go-isc-dhcp (c) 2020 Felix Pojtinger
130130

131131
SPDX-License-Identifier: AGPL-3.0

cmd/dhclientctl/cmd/apply.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package cmd
33
import (
44
"context"
55
"fmt"
6-
constants "github.com/pojntfx/godhcpd/cmd"
7-
godhcpd "github.com/pojntfx/godhcpd/pkg/proto/generated"
6+
constants "github.com/pojntfx/go-isc-dhcp/cmd"
7+
goISCDHCP "github.com/pojntfx/go-isc-dhcp/pkg/proto/generated"
88
"github.com/spf13/cobra"
99
"github.com/spf13/viper"
1010
"gitlab.com/bloom42/libs/rz-go"
@@ -31,12 +31,12 @@ var applyCmd = &cobra.Command{
3131
}
3232
defer conn.Close()
3333

34-
client := godhcpd.NewDHClientManagerClient(conn)
34+
client := goISCDHCP.NewDHClientManagerClient(conn)
3535

3636
ctx, cancel := context.WithCancel(context.Background())
3737
defer cancel()
3838

39-
response, err := client.Create(ctx, &godhcpd.DHClient{
39+
response, err := client.Create(ctx, &goISCDHCP.DHClient{
4040
Device: viper.GetString(deviceKey),
4141
})
4242
if err != nil {

cmd/dhclientctl/cmd/delete.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package cmd
33
import (
44
"context"
55
"fmt"
6-
constants "github.com/pojntfx/godhcpd/cmd"
7-
godhcpd "github.com/pojntfx/godhcpd/pkg/proto/generated"
6+
constants "github.com/pojntfx/go-isc-dhcp/cmd"
7+
goISCDHCP "github.com/pojntfx/go-isc-dhcp/pkg/proto/generated"
88
"github.com/spf13/cobra"
99
"github.com/spf13/viper"
1010
"gitlab.com/bloom42/libs/rz-go"
@@ -25,7 +25,7 @@ var deleteCmd = &cobra.Command{
2525
}
2626
defer conn.Close()
2727

28-
client := godhcpd.NewDHClientManagerClient(conn)
28+
client := goISCDHCP.NewDHClientManagerClient(conn)
2929

3030
ctx, cancel := context.WithCancel(context.Background())
3131
defer cancel()
@@ -36,7 +36,7 @@ var deleteCmd = &cobra.Command{
3636
wg.Add(1)
3737

3838
go func(id string, wg *sync.WaitGroup) {
39-
response, err := client.Delete(ctx, &godhcpd.DHClientManagedId{
39+
response, err := client.Delete(ctx, &goISCDHCP.DHClientManagedId{
4040
Id: id,
4141
})
4242
if err != nil {
@@ -64,7 +64,7 @@ func init() {
6464
serverHostPortFlag string
6565
)
6666

67-
deleteCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHClientDHostPortDefault, "Host:port of the godhcpd server to use.")
67+
deleteCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHClientDHostPortDefault, "Host:port of the go-isc-dhcp server to use.")
6868

6969
if err := viper.BindPFlags(deleteCmd.PersistentFlags()); err != nil {
7070
log.Fatal(constants.CouldNotBindFlagsErrorMessage, rz.Err(err))

cmd/dhclientctl/cmd/get.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"github.com/ghodss/yaml"
77
"github.com/gosuri/uitable"
8-
constants "github.com/pojntfx/godhcpd/cmd"
9-
godhcpd "github.com/pojntfx/godhcpd/pkg/proto/generated"
8+
constants "github.com/pojntfx/go-isc-dhcp/cmd"
9+
goISCDHCP "github.com/pojntfx/go-isc-dhcp/pkg/proto/generated"
1010
"github.com/spf13/cobra"
1111
"github.com/spf13/viper"
1212
"gitlab.com/bloom42/libs/rz-go"
@@ -25,13 +25,13 @@ var getCmd = &cobra.Command{
2525
}
2626
defer conn.Close()
2727

28-
client := godhcpd.NewDHClientManagerClient(conn)
28+
client := goISCDHCP.NewDHClientManagerClient(conn)
2929

3030
ctx, cancel := context.WithCancel(context.Background())
3131
defer cancel()
3232

3333
if len(args) < 1 {
34-
response, err := client.List(ctx, &godhcpd.DHClientManagerListArgs{})
34+
response, err := client.List(ctx, &goISCDHCP.DHClientManagerListArgs{})
3535
if err != nil {
3636
return err
3737
}
@@ -52,7 +52,7 @@ var getCmd = &cobra.Command{
5252
return nil
5353
}
5454

55-
response, err := client.Get(ctx, &godhcpd.DHClientManagedId{
55+
response, err := client.Get(ctx, &goISCDHCP.DHClientManagedId{
5656
Id: args[0],
5757
})
5858
if err != nil {
@@ -75,7 +75,7 @@ func init() {
7575
serverHostPortFlag string
7676
)
7777

78-
getCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHClientDHostPortDefault, "Host:port of the godhcpd server to use.")
78+
getCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHClientDHostPortDefault, "Host:port of the go-isc-dhcp server to use.")
7979

8080
if err := viper.BindPFlags(getCmd.PersistentFlags()); err != nil {
8181
log.Fatal(constants.CouldNotBindFlagsErrorMessage, rz.Err(err))

cmd/dhclientctl/cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var rootCmd = &cobra.Command{
1414
Long: `dhclientctl manages dhclientd, the ISC DHCP client management daemon.
1515
1616
Find more information at:
17-
https://pojntfx.github.io/godhcpd/`,
17+
https://pojntfx.github.io/go-isc-dhcp/`,
1818
PersistentPreRun: func(cmd *cobra.Command, args []string) {
1919
viper.SetEnvPrefix("dhcpd")
2020
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_"))

cmd/dhclientctl/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import "github.com/pojntfx/godhcpd/cmd/dhclientctl/cmd"
3+
import "github.com/pojntfx/go-isc-dhcp/cmd/dhclientctl/cmd"
44

55
func main() {
66
cmd.Execute()

cmd/dhclientd/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package main
22

33
import (
4-
constants "github.com/pojntfx/godhcpd/cmd"
5-
godhcpd "github.com/pojntfx/godhcpd/pkg/proto/generated"
6-
"github.com/pojntfx/godhcpd/pkg/svc"
7-
"github.com/pojntfx/godhcpd/pkg/workers"
4+
constants "github.com/pojntfx/go-isc-dhcp/cmd"
5+
goISCDHCP "github.com/pojntfx/go-isc-dhcp/pkg/proto/generated"
6+
"github.com/pojntfx/go-isc-dhcp/pkg/svc"
7+
"github.com/pojntfx/go-isc-dhcp/pkg/workers"
88
"github.com/spf13/cobra"
99
"github.com/spf13/viper"
1010
"gitlab.com/bloom42/libs/rz-go"
@@ -32,7 +32,7 @@ var rootCmd = &cobra.Command{
3232
Long: `dhclientd is the ISC DHCP client management daemon.
3333
3434
Find more information at:
35-
https://pojntfx.github.io/godhcpd/`,
35+
https://pojntfx.github.io/go-isc-dhcp/`,
3636
PersistentPreRun: func(cmd *cobra.Command, args []string) {
3737
viper.SetEnvPrefix("dhclientd")
3838
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_"))
@@ -60,7 +60,7 @@ https://pojntfx.github.io/godhcpd/`,
6060
DHClientsManaged: make(map[string]*workers.DHClient),
6161
}
6262

63-
godhcpd.RegisterDHClientManagerServer(server, &DHClientService)
63+
goISCDHCP.RegisterDHClientManagerServer(server, &DHClientService)
6464

6565
interrupt := make(chan os.Signal, 2)
6666
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)

cmd/dhcpdctl/cmd/apply.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"context"
55
"fmt"
66
"github.com/ghodss/yaml"
7-
constants "github.com/pojntfx/godhcpd/cmd"
8-
godhcpd "github.com/pojntfx/godhcpd/pkg/proto/generated"
7+
constants "github.com/pojntfx/go-isc-dhcp/cmd"
8+
goISCDHCP "github.com/pojntfx/go-isc-dhcp/pkg/proto/generated"
99
"github.com/spf13/cobra"
1010
"github.com/spf13/viper"
1111
"gitlab.com/bloom42/libs/rz-go"
@@ -18,7 +18,7 @@ var applyCmd = &cobra.Command{
1818
Aliases: []string{"a"},
1919
Short: "Apply a dhcp server",
2020
RunE: func(cmd *cobra.Command, args []string) error {
21-
var subnets []*godhcpd.Subnet
21+
var subnets []*goISCDHCP.Subnet
2222

2323
if !(viper.GetString(configFileKey) == configFileDefault) {
2424
viper.SetConfigFile(viper.GetString(configFileKey))
@@ -42,12 +42,12 @@ var applyCmd = &cobra.Command{
4242
}
4343
defer conn.Close()
4444

45-
client := godhcpd.NewDHCPDManagerClient(conn)
45+
client := goISCDHCP.NewDHCPDManagerClient(conn)
4646

4747
ctx, cancel := context.WithCancel(context.Background())
4848
defer cancel()
4949

50-
response, err := client.Create(ctx, &godhcpd.DHCPD{
50+
response, err := client.Create(ctx, &goISCDHCP.DHCPD{
5151
Device: viper.GetString(deviceKey),
5252
Subnets: subnets,
5353
})

cmd/dhcpdctl/cmd/delete.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package cmd
33
import (
44
"context"
55
"fmt"
6-
constants "github.com/pojntfx/godhcpd/cmd"
7-
godhcpd "github.com/pojntfx/godhcpd/pkg/proto/generated"
6+
constants "github.com/pojntfx/go-isc-dhcp/cmd"
7+
goISCDHCP "github.com/pojntfx/go-isc-dhcp/pkg/proto/generated"
88
"github.com/spf13/cobra"
99
"github.com/spf13/viper"
1010
"gitlab.com/bloom42/libs/rz-go"
@@ -25,7 +25,7 @@ var deleteCmd = &cobra.Command{
2525
}
2626
defer conn.Close()
2727

28-
client := godhcpd.NewDHCPDManagerClient(conn)
28+
client := goISCDHCP.NewDHCPDManagerClient(conn)
2929

3030
ctx, cancel := context.WithCancel(context.Background())
3131
defer cancel()
@@ -36,7 +36,7 @@ var deleteCmd = &cobra.Command{
3636
wg.Add(1)
3737

3838
go func(id string, wg *sync.WaitGroup) {
39-
response, err := client.Delete(ctx, &godhcpd.DHCPDManagedId{
39+
response, err := client.Delete(ctx, &goISCDHCP.DHCPDManagedId{
4040
Id: id,
4141
})
4242
if err != nil {
@@ -64,7 +64,7 @@ func init() {
6464
serverHostPortFlag string
6565
)
6666

67-
deleteCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHCPDDHostPortDefault, "Host:port of the godhcpd server to use.")
67+
deleteCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHCPDDHostPortDefault, "Host:port of the go-isc-dhcp server to use.")
6868

6969
if err := viper.BindPFlags(deleteCmd.PersistentFlags()); err != nil {
7070
log.Fatal(constants.CouldNotBindFlagsErrorMessage, rz.Err(err))

cmd/dhcpdctl/cmd/get.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"github.com/ghodss/yaml"
77
"github.com/gosuri/uitable"
8-
constants "github.com/pojntfx/godhcpd/cmd"
9-
godhcpd "github.com/pojntfx/godhcpd/pkg/proto/generated"
8+
constants "github.com/pojntfx/go-isc-dhcp/cmd"
9+
goISCDHCP "github.com/pojntfx/go-isc-dhcp/pkg/proto/generated"
1010
"github.com/spf13/cobra"
1111
"github.com/spf13/viper"
1212
"gitlab.com/bloom42/libs/rz-go"
@@ -25,13 +25,13 @@ var getCmd = &cobra.Command{
2525
}
2626
defer conn.Close()
2727

28-
client := godhcpd.NewDHCPDManagerClient(conn)
28+
client := goISCDHCP.NewDHCPDManagerClient(conn)
2929

3030
ctx, cancel := context.WithCancel(context.Background())
3131
defer cancel()
3232

3333
if len(args) < 1 {
34-
response, err := client.List(ctx, &godhcpd.DHCPDManagerListArgs{})
34+
response, err := client.List(ctx, &goISCDHCP.DHCPDManagerListArgs{})
3535
if err != nil {
3636
return err
3737
}
@@ -52,7 +52,7 @@ var getCmd = &cobra.Command{
5252
return nil
5353
}
5454

55-
response, err := client.Get(ctx, &godhcpd.DHCPDManagedId{
55+
response, err := client.Get(ctx, &goISCDHCP.DHCPDManagedId{
5656
Id: args[0],
5757
})
5858
if err != nil {
@@ -75,7 +75,7 @@ func init() {
7575
serverHostPortFlag string
7676
)
7777

78-
getCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHCPDDHostPortDefault, "Host:port of the godhcpd server to use.")
78+
getCmd.PersistentFlags().StringVarP(&serverHostPortFlag, serverHostPortKey, "s", constants.DHCPDDHostPortDefault, "Host:port of the go-isc-dhcp server to use.")
7979

8080
if err := viper.BindPFlags(getCmd.PersistentFlags()); err != nil {
8181
log.Fatal(constants.CouldNotBindFlagsErrorMessage, rz.Err(err))

0 commit comments

Comments
 (0)