func (s *Subscription) ID() string {
	return s.id
}
ID returns the id of this subscription.
package sync
import (
	"github.com/rs/xid"
	"github.com/yorkie-team/yorkie/pkg/document/key"
	"github.com/yorkie-team/yorkie/pkg/types"
)
type Subscription struct {
	id         string
	subscriber types.Client
	closed     bool
	events     chan DocEvent
}
func NewSubscription(subscriber types.Client) *Subscription {
	return &Subscription{
		id:         xid.New().String(),
		subscriber: subscriber,
		events:     make(chan DocEvent, 1),
	}
}