tassis

command module
v0.0.0-...-ea65d50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

README

tassis Build and Test Coverage Status Go Reference

See testsupport/testsupport.go for a fairly full usage example that illustrates the message exchange pattern.

Comprehensive user documentation, including message formats, is in docs.

Redis Clustering

tassis is designed to run on Redis Cluster. That means that we need to pay attention to key distribution (see section "Keys hash tags" of the Redis Cluster Spec).

Global Keys

Global keys like the index of all chat numbers us the hash tag {global}.

Identity-specific Keys

Identity specific keys like that inbound messages for a given identity use {identityKey} as the hash tag.

Protocol Buffers

This project uses protocol buffers. Follow the tutorial to ensure that you have the right tools in place, then run make to ensure the protocol buffers are up to date.

Generating documentation

Documentation is generated using protoc-gen-doc. You can install it with go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

Testing

You can run all the tests with make test-and-cover.

Tests will also run in GitHub CI. If you install act you can also run the whole CI run locally with COVERALLS_TOKEN=<token> make ci where <token> is the token for uploading to coveralls.io.

The first time you run make ci it will take a while because it has to download a bunch of stuff. After that, it should run much faster, unless you change build_and_test.yml.

Smoke Testing

You can run a smoke test against the live environment with SMOKE_TEST_URL="wss://<host>/api" make smoke-test, where <host> is the host of the tassis server you wish to test.

curve25519 to ed25519 conversion

Signal uses curve25519 keys for performing elliptic curve diffie helman key exchanges, and it also converts these into ed25519 keys for message signing. The authentication protocol for tassis relies on such signatures, so it needs a way to convert the curve25519 public key into an ed25519 public key. There's no suitable library for this, so we end up relying on code copied verbatim from golang/crypto/master/ed25519/internal/edwards25519/edwards25519.go to help with that conversion.

logs

Production logs can be found in Logtail at https://logtail.com/

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
membroker
membroker implements a memory-based broker.Broker.
membroker implements a memory-based broker.Broker.
redisbroker
redisbroker implements the ../broker.Broker interface using Redis streams.
redisbroker implements the ../broker.Broker interface using Redis streams.
db
memdb
memdb implements a memory-based db.DB.
memdb implements a memory-based db.DB.
redisdb
redisdb provides an implementation of the ../db.DB interface backed by a Redis database.
redisdb provides an implementation of the ../db.DB interface backed by a Redis database.
package forwarder provides a facility for forwarding messages to another tassis cluster
package forwarder provides a facility for forwarding messages to another tassis cluster
memforwarder
memforwarder provides an implementation of forwarder using process-local in-memory services
memforwarder provides an implementation of forwarder using process-local in-memory services
webforwarder
webforwarder provides an implementation of forwarder by dialing webclient connections
webforwarder provides an implementation of forwarder by dialing webclient connections
package presence provides facilities for announcing and discovering the presence of devices, where presence is defined as the hostname of a tassis server through which the device is reachable.
package presence provides facilities for announcing and discovering the presence of devices, where presence is defined as the hostname of a tassis server through which the device is reachable.
mempresence
package mempresence provides a local in-memory repository of presence information
package mempresence provides a local in-memory repository of presence information
staticpresence
package staticpresences provides an implementation of the presence.Repository interface that assumes all users are on the local cluster
package staticpresences provides an implementation of the presence.Repository interface that assumes all users are on the local cluster
package web provides a websocket frontend to a tassis service
package web provides a websocket frontend to a tassis service
package webclient provides a client that connects to a tassis Service via its websocket front end
package webclient provides a client that connects to a tassis Service via its websocket front end

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL