health check
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m52s

This commit is contained in:
matst80
2024-11-10 23:20:52 +01:00
parent c5bc17c44d
commit 743849a131
3 changed files with 41 additions and 1 deletions

View File

@@ -30,6 +30,10 @@ func NewGrainHandler(pool *GrainLocalPool, listen string) (*GrainHandler, error)
return handler, err
}
func (h *GrainHandler) IsHealthy() bool {
return len(h.pool.grains) < h.pool.PoolSize
}
func (h *GrainHandler) RemoteHandleMessageHandler(id CartId, data []byte) (uint32, []byte, error) {
var msg Message
err := ReadMessage(bytes.NewReader(data), &msg)