Giter Site home page Giter Site logo

Comments (3)

mycognosist avatar mycognosist commented on May 18, 2024 1

@cryptix

Thanks for the extra details! I think I understand now.

My question was basically: how to select the different options? Now I see that they're exposed by go-sbot via flags. So I can set hops to 2, for example: go-sbot -hops 2. Or I could set a custom mountpoint: go-sbot -repo "/some/other/dir". Cool. Thanks again.

from go-ssb.

cryptix avatar cryptix commented on May 18, 2024

Hmm... Interesting! :)

Could you give a bit more context on what you are trying to do? The list of all the available options is best looked at on this godoc page for the sbot package.

The example you linked to is basically a slimmed down version of cmd/go-sbot/main.go which is basically just a thin wrapper which unpacks CLI flags and passes them on to the options API.

If go-sbot doesn't have the option you are looking for (I vaguely believe it does have all of them but would like to fix that if it doesn't) the code to create a peer inside another go program is exactly like that in the example. You just add the options (with the package name first) as one more argument to sbot.Sbot(...). They are variadic, so the number doesn't matter.

HTH?

from go-ssb.

cryptix avatar cryptix commented on May 18, 2024

ah.. ps: cmd/sbotcli is just a ssb-client. The server/bot magic is in ssb/sbot which has an options.go, etc. but you don't need to mess with any of that unless you want new options that aren't there yet.

from go-ssb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.