コード例 #1
0
ファイル: storage.go プロジェクト: pdxjohnny/dist-rts
func NewStorage() *Storage {
	// Service setup
	inner := service.NewService()
	storage := Storage{Service: inner}
	storage.Caller = &storage
	// Init Data map
	storage.Data = make(map[string][]byte)
	// Init DumpTrack map
	storage.DumpTrack = make(map[string]chan bool)
	return &storage
}
コード例 #2
0
ファイル: client.go プロジェクト: pdxjohnny/dist-rts
func NewClient() *Client {
	// Service setup
	inner := service.NewService()
	client := Client{Service: inner}
	client.Caller = &client
	// Init Channels map
	client.Channels = make(map[string]chan string)
	// Init Shared map
	client.Shared = make(map[string]interface{})
	return &client
}