add basic command status (so program is able to run)
This commit is contained in:
parent
3b4c0f49d4
commit
cd284d1214
@ -41,6 +41,11 @@ func (p Proxy) Delete(id state.CustomUUID) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (p Proxy) Status() error {
|
||||
_, err := p.execute(status())
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: status function returning map of tunnels
|
||||
|
||||
func (p Proxy) execute(c command) (string, error) {
|
||||
@ -72,6 +77,7 @@ type command struct {
|
||||
Create *commandCreate `json:"create,omitempty"`
|
||||
Modify *commandModify `json:"modify,omitempty"`
|
||||
Delete *commandDelete `json:"delete,omitempty"`
|
||||
Status *commandStatus `json:"status,omitempty"`
|
||||
Timestamp uint64 `json:"timestamp,omitempty"`
|
||||
Signature string `json:"signature,omitempty"`
|
||||
}
|
||||
@ -112,4 +118,15 @@ func delete(id state.CustomUUID) command {
|
||||
c:= command{}
|
||||
c.Delete = &d
|
||||
return c
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
type commandStatus struct {
|
||||
}
|
||||
|
||||
func status() command {
|
||||
d:= commandStatus{}
|
||||
c:= command{}
|
||||
c.Status = &d
|
||||
return c
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user