17 lines
420 B
Go
17 lines
420 B
Go
package main
|
|
|
|
import (
|
|
"nats-tools/internal/busconn"
|
|
|
|
"github.com/nats-io/nats.go"
|
|
)
|
|
|
|
// Credential is what the mesh seals to a module so it can reach the bus; see busconn.
|
|
type Credential = busconn.Credential
|
|
|
|
func readCredential(path string) (Credential, error) { return busconn.Read(path) }
|
|
|
|
func connect(server string, c Credential) (*nats.Conn, error) {
|
|
return busconn.Connect(server, c, "mesh-nats-snapshot")
|
|
}
|