Subscriptions. A ClientSubscription represents a subscription established through EthSubscribe.
| 705 | |
| 706 | // A ClientSubscription represents a subscription established through EthSubscribe. |
| 707 | type ClientSubscription struct { |
| 708 | client *Client |
| 709 | etype reflect.Type |
| 710 | channel reflect.Value |
| 711 | namespace string |
| 712 | subid string |
| 713 | in chan json.RawMessage |
| 714 | |
| 715 | quitOnce sync.Once // ensures quit is closed once |
| 716 | quit chan struct{} // quit is closed when the subscription exits |
| 717 | errOnce sync.Once // ensures err is closed once |
| 718 | err chan error |
| 719 | } |
| 720 | |
| 721 | func newClientSubscription(c *Client, namespace string, channel reflect.Value) *ClientSubscription { |
| 722 | sub := &ClientSubscription{ |
nothing calls this directly
no outgoing calls
no test coverage detected