Skip to content
/ ayu Public

Scalable WebRTC Signaling Server with ayame-like protocol.

License

Notifications You must be signed in to change notification settings

castaneai/ayu

Repository files navigation

ayu

Go Reference Go Report Card

ayu is WebRTC Signaling Server with ayame-like protocol.

  • Scalable: ayu uses Redis to store room states, so it can be used on serverless platforms (e.g. Cloud Run).
  • Composable: ayu provides a net/http compatible WebSocket handler.
  • Customizable: ayu provides authentication and logger interface, which can be customized.
  • No vendor lock-in: ayu depends only on Redis. It is not locked in to any specific cloud provider.

Usage

In the following example, ws://localhost:8080/signaling will be the endpoint of the signaling server. Please see ayame-spec for details.

package main

import (
	"log"
	"net/http"

	"github.com/castaneai/ayu"
	"github.com/go-redis/redis/v8"
)

func main() {
	redisClient := redis.NewClient(&redis.Options{Addr: "x.x.x.x:6379"})
	sv := ayu.NewServer(redisClient)
	defer sv.Shutdown()
	http.Handle("/signaling", sv)

	addr := ":8080"
	log.Printf("listening on %s...", addr)
	log.Fatal(http.ListenAndServe(addr, nil))
}

Testing

make test

License

Apache-2.0

About

Scalable WebRTC Signaling Server with ayame-like protocol.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published