32-incorporate-dns

Incorporated a DNS server. A DNS server can be run to resolve host
names.
This commit is contained in:
Tim Beatham
2023-11-24 15:04:07 +00:00
parent f28ed8260d
commit d1a74a7b95
5 changed files with 164 additions and 2 deletions

View File

@ -1,6 +1,9 @@
package lib
import "github.com/google/uuid"
import (
"github.com/anandvarma/namegen"
"github.com/google/uuid"
)
// IdGenerator generates unique ids
type IdGenerator interface {
@ -15,3 +18,11 @@ func (g *UUIDGenerator) GetId() (string, error) {
id := uuid.New()
return id.String(), nil
}
type IDNameGenerator struct {
}
func (i *IDNameGenerator) GetId() (string, error) {
name_schema := namegen.New()
return name_schema.Get(), nil
}