-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch server to gorilla mux; fix netron; add middleware support
- Loading branch information
Showing
14 changed files
with
609 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
// Configuration stores dbs configuration parameters | ||
type Configuration struct { | ||
Port int `json:"port"` // dbs port number | ||
ModelDir string `json:"modelDir"` // location of model directory | ||
StaticDir string `json:"staticDir"` // speficy static dir location | ||
ConfigProto string `json:"configProto"` // TF config proto file to use | ||
Base string `json:"base"` // dbs base path | ||
LogFile string `json:"logFile"` // log file | ||
Verbose int `json:"verbose"` // verbosity level | ||
ServerKey string `json:"serverKey"` // server key for https | ||
ServerCrt string `json:"serverCrt"` // server certificate for https | ||
UpdateDNs int `json:"updateDNs"` // interval in minutes to update user DNs | ||
CacheLimit int `json:"cacheLimit"` // number of TFModels to keep in cache | ||
} | ||
|
||
// String returns string representation of server configuration | ||
func (c *Configuration) String() string { | ||
return fmt.Sprintf("<Config port=%d modelDir=%s staticDir=%s base=%s configProt=%s verbose=%d log=%s crt=%s key=%s>", c.Port, c.ModelDir, c.StaticDir, c.Base, c.ConfigProto, c.Verbose, c.LogFile, c.ServerCrt, c.ServerKey) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.