GitHub user Ji-Xinyou edited a comment on the discussion: The map construction in opendal's C binding
> > Also, different backends use different KVs, if we are using the AWS way, we > > accept params like `opendal_operatior_config`. > > Every service will have their own builder like `opendal_service_s3_builder`. > The hashmap thing is an easier way to build a `S3Builder`. And finally, we > will use the builder to build the service. So what about this way of API. Builders: ```C opendal_builder_fs opendal_builder_fs_new(struct opendal_builder_fs_config); opendal_builder_memory opendal_builder_memory_new(struct opendal_builder_memory_config); ``` Operators: ```C opendal_operator_ptr opendal_operator_new(char *scheme, void *builder); ``` And in runtime we cast the `void*` to what we want (the C way generics lol). GitHub link: https://github.com/apache/incubator-opendal/discussions/1904#discussioncomment-5577577 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
