mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-08-13 15:07:12 +02:00
32-incorporate-dns
Incorporated a DNS server. A DNS server can be run to resolve host names.
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user