mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
ipn/ipnlocal: rename SetWebLocalClient to ConfigureWebClient
For consistency with the "WebClient" naming of the other functions here. Also fixed a doc typo. A #cleanup Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:

committed by
Sonia Appasamy

parent
d5c460e83c
commit
6f7a1b51a8
@@ -26,7 +26,7 @@ const webClientPort = web.ListenPort
|
||||
|
||||
// webClient holds state for the web interface for managing
|
||||
// this tailscale instance. The web interface is not used by
|
||||
// default, but initialized by calling LocalBackend.WebOrInit.
|
||||
// default, but initialized by calling LocalBackend.WebClientInit.
|
||||
type webClient struct {
|
||||
server *web.Server // or nil, initialized lazily
|
||||
|
||||
@@ -36,9 +36,10 @@ type webClient struct {
|
||||
lc *tailscale.LocalClient
|
||||
}
|
||||
|
||||
// SetWebLocalClient sets the b.web.lc function.
|
||||
// If lc is provided as nil, b.web.lc is cleared out.
|
||||
func (b *LocalBackend) SetWebLocalClient(lc *tailscale.LocalClient) {
|
||||
// ConfigureWebClient configures b.web prior to use.
|
||||
// Specifially, it sets b.web.lc to the provided LocalClient.
|
||||
// If provided as nil, b.web.lc is cleared out.
|
||||
func (b *LocalBackend) ConfigureWebClient(lc *tailscale.LocalClient) {
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
b.webClient.lc = lc
|
||||
|
@@ -16,7 +16,7 @@ const webClientPort = 5252
|
||||
|
||||
type webClient struct{}
|
||||
|
||||
func (b *LocalBackend) SetWebLocalClient(lc *tailscale.LocalClient) {}
|
||||
func (b *LocalBackend) ConfigureWebClient(lc *tailscale.LocalClient) {}
|
||||
|
||||
func (b *LocalBackend) WebClientInit() error {
|
||||
return errors.New("not implemented")
|
||||
|
Reference in New Issue
Block a user