Documentation
¶
Index ¶
Constants ¶
View Source
const ( SleepTime = time.Microsecond * 100 MaxBatchSize = 32 MaxLatency = 5000 )
Variables ¶
This section is empty.
Functions ¶
func GenerateUUID ¶
func GenerateUUID() string
func GetNowTime ¶
Types ¶
type BatchHandler ¶
type BatchHandler struct { MaxBatchSize int MaxLatency int // contains filtered or unexported fields }
func New ¶
func New(maxBatchSize int, maxLatency int, handler http.Handler, logger *zap.SugaredLogger) *BatchHandler
func (*BatchHandler) Consume ¶
func (handler *BatchHandler) Consume()
func (*BatchHandler) ServeHTTP ¶
func (handler *BatchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BatcherInfo ¶
type BatcherInfo struct { Path string BatchID string Request *http.Request Instances []interface{} PredictionResponse PredictionResponse ContextMap map[*context.Context]InputInfo Start time.Time Now time.Time CurrentInputLen int }
func (*BatcherInfo) InitializeInfo ¶
func (batcherInfo *BatcherInfo) InitializeInfo()
type PredictionResponse ¶
type PredictionResponse struct {
Predictions []interface{} `json:"predictions"`
}
type ResponseError ¶
type ResponseError struct {
Message string `json:"message"`
}
Click to show internal directories.
Click to hide internal directories.