Git Product home page Git Product logo

natsv's Introduction

module natsv

Client lib for nats.io.

Contents

MSG

struct MSG {
mut:
	subid string
pub mut:
	subject string
	msg     string
	size    int
}

[Return to contents]

Nats

struct Nats {
pub mut:
	verbose  bool
	pedantic bool
	echo     bool
mut:
	url       string
	user      string
	pass      string
	lastid    int
	handlers  shared map[string]SubjectHandler
	inch      chan string
	inmsg     chan MSG
	info      json2.Any
	connected bool
	c         net.TcpConn
}

[Return to contents]

connect

fn (mut n Nats) connect(url string, user string, pass string) ?

Connect to nats server.

[Return to contents]

close

fn (mut n Nats) close() ?

Close connection.

[Return to contents]

sub

fn (mut n Nats) sub(subject string, cb SubjectHandler) ?string

Subscribe to subject.

[Return to contents]

usub

fn (mut n Nats) usub(subid string) ?

Unsubscribe to subject.

[Return to contents]

publish

fn (mut n Nats) publish(subject string, msg string) ?

Publish message.

[Return to contents]

Powered by vdoc. Generated on: 2 Aug 2021 11:14:31

natsv's People

Contributors

sarjsheff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.