MCPcopy
hub / github.com/tailscale/tailscale / ExampleServer

Function ExampleServer

tsnet/example_tsnet_test.go:20–26  ·  view source on GitHub ↗

ExampleServer shows you how to construct a ready-to-use tsnet instance.

()

Source from the content-addressed store, hash-verified

18
19// ExampleServer shows you how to construct a ready-to-use tsnet instance.
20func ExampleServer() {
21 srv := new(tsnet.Server)
22 if err := srv.Start(); err != nil {
23 log.Fatalf("can't start tsnet server: %v", err)
24 }
25 defer srv.Close()
26}
27
28// ExampleServer_hostname shows you how to set a tsnet server's hostname.
29//

Callers

nothing calls this directly

Calls 3

StartMethod · 0.65
FatalfMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…