netpool test. wip
This commit is contained in:
@@ -3,6 +3,8 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/yudhasubki/netpool"
|
||||
)
|
||||
|
||||
func (id CartId) String() string {
|
||||
@@ -43,12 +45,13 @@ type RemoteGrain struct {
|
||||
Host string
|
||||
}
|
||||
|
||||
func NewRemoteGrain(id CartId, host string) (*RemoteGrain, error) {
|
||||
func NewRemoteGrain(id CartId, host string, pool netpool.Netpooler) *RemoteGrain {
|
||||
addr := fmt.Sprintf("%s:1337", host)
|
||||
return &RemoteGrain{
|
||||
Id: id,
|
||||
Host: host,
|
||||
Connection: NewConnection(fmt.Sprintf("%s:1337", host)),
|
||||
}, nil
|
||||
Connection: NewConnection(addr, pool),
|
||||
}
|
||||
}
|
||||
|
||||
func (g *RemoteGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPayload, error) {
|
||||
|
||||
Reference in New Issue
Block a user