// Close terminates the running Api.
Close terminates the running Api.
// Close terminates the running Api .
func (i *API) Close() error {
	i.lock.Lock()
	defer i.lock.Unlock()
	if i.closed {
		return nil
	}
	i.cancel()
	i.closed = true
	return nil
}
func ( i * API ) Close ( ) error { i . lock . Lock ( ) defer i . lock . Unlock ( ) if i . closed { return nil } i . cancel ( ) i . closed = true return nil }
Close terminates the running Api.
Close terminates the running Api .