// serverAddr should't have a trailing space func New(opts *clientutil.Opts) *DocStore { if opts == nil { opts = DefaultOpts() } return &DocStore{ client: clientutil.New(opts), } }
func NewSyncTableClient(state *State, blobstore *embed.BlobStore, nsDB *nsdb.DB, ns, url, apiKey string, blobs chan<- *router.Blob) *SyncTableClient { // Only enable HTTP2 if the remote url uses HTTPS clientOpts := &clientutil.Opts{ APIKey: apiKey, Host: url, Namespace: ns, } return &SyncTableClient{ client: clientutil.New(clientOpts), blobs: blobs, url: url, nsdb: nsDB, apiKey: apiKey, state: state, blobstore: blobstore, namespace: ns, } }