Documentation ¶
Overview ¶
Package dinkurd contains a Dinkur gRPC API server daemon implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUintTooLarge = fmt.Errorf("unsigned int value is too large, maximum: %d", uint64(math.MaxUint)) ErrDaemonIsNil = errors.New("daemon is nil") ErrRequestIsNil = errors.New("grpc request was nil") ErrAlreadyServing = errors.New("daemon instance is already running") )
Errors that are specific to the Dinkur gRPC server daemon.
var DefaultOptions = Options{
BindAddress: "localhost:59122",
}
DefaultOptions values are used for any zero values used when creating a new daemon instance.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon interface { // Serve starts the gRPC server and waits. The function does not return // unless the context is cancelled, or if there was an error. Serve(ctx context.Context) error // Close gracefully shuts down the daemon server. Close() error }
Daemon is the Dinkur daemon service interface.
func NewDaemon ¶
NewDaemon creates a new Daemon instance that relays all gRPC traffic to the given dinkur.Client. This daemon implementation does not perform any database communication nor has any persistence in of itself. This daemon must be paired with a dinkur.Client such as the dinkurdb client to talk to an Sqlite3 database file, or the dinkurclient client to act as a proxy.
Both the global DefaultOptions and the opt parameter is used. The DefaultOptions values are only used for any zero valued fields in the opt parameter.