Restructure snowflake library for v2 release
The next time we bump the version of Snowflake, we have to make a major version bump because of the changes to
NewSnowflakeClient needed for the new AMP cache rendezvous method. This is a good opportunity to evaluate our API, which functions/structures are exported, and which API features will be most useful for others who want to use our library. We should also take a look at best practices for library structure and naming mechanics and how much room we have to change there.
Some things to consider:
OONI has requested we introduce a way to direct Snowflake logs to a chosen output
As discussed in !50 (closed), if we export the
RendezvousMethodinterface, callers of the library can implement their own rendezvous methods
Implementing callbacks for specific events would make it easier for calling programs to debug or react different to different types of connection failures or censorship attempts (see #40062 (closed) for some inspiration for this)
Can we get some official Go documentation/reference for this library? Let's at least evaluate if we need to improve what we have
We're probably exporting way more things than we need to be. Cutting down on what we export will make documentation and usage of the library simpler, and also might help reduce binary size (though I haven't confirmed this).