mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-09-18 15:08:21 +03:00
feat: create execute command
This commit is contained in:
@@ -22,10 +22,11 @@ func (r *ResponseStore) Write(responseID string, channel chan domainHub.AgentRes
|
||||
r.store[responseID] = channel
|
||||
}
|
||||
|
||||
func (r *ResponseStore) Read(responseID string) chan domainHub.AgentResponse {
|
||||
func (r *ResponseStore) Read(responseID string) (chan domainHub.AgentResponse, bool) {
|
||||
r.mutex.RLock()
|
||||
defer r.mutex.RUnlock()
|
||||
return r.store[responseID]
|
||||
ch, ok := r.store[responseID]
|
||||
return ch, ok
|
||||
}
|
||||
|
||||
func (r *ResponseStore) Delete(responseID string) {
|
||||
|
||||
Reference in New Issue
Block a user