vespa icon indicating copy to clipboard operation
vespa copied to clipboard

Export Vespa golang client API as a library

Open ankurcha opened this issue 1 year ago • 7 comments
trafficstars

Is your feature request related to a problem? Please describe. I would like to use an official / supported golang client for integrating a application written in golang. The current clients/go contains the command line utility and a bunch of very useful utility functions that should ideally be exported so that developers can use that directly rather than having to implement it from scratch using http/client.

Describe the solution you'd like I would like to see the clients/go utility export a usable interface that can be integrated in the client applications.

Describe alternatives you've considered

  • I have vendored the clients/go directory and manually edited the source to directly use the functions relevant for feeding data.
  • I have also gone down the path of using the standard http client but the throttling and circuitbreaking facilities are highly desirable.

Additional context N/A

ankurcha avatar Feb 27 '24 06:02 ankurcha

Is it primarily the feed client you're interested in? (document package: https://github.com/vespa-engine/vespa/tree/master/client/go/internal/vespa/document)

mpolden avatar Feb 28 '24 12:02 mpolden

Correct, feeder is the primary use case right now. The admin functions would be low priority but nice to have eventually.

ankurcha avatar Feb 28 '24 20:02 ankurcha

We have discussed exposing CLI as a library several times internally. The feeder might be good starting point.

mpolden avatar Feb 29 '24 08:02 mpolden

start with adding feed (and possibly visit)

kkraune avatar Mar 06 '24 13:03 kkraune

... and set beta/experimental, if possible ...

kkraune avatar Mar 06 '24 13:03 kkraune