services

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup added in v1.7.1

func Cleanup()

func DisplayNameOfClient added in v1.12.0

func DisplayNameOfClient(name string) string

func InstallService

func InstallService(name string, configPath string, manual bool) error

InstallService runs the program as Windows service

func QueryService

func QueryService(name string) (bool, error)

QueryService returns whether the given service is running

func ReloadService added in v1.13.0

func ReloadService(confName string) error

ReloadService sends a reload event to the frp service which triggers hot-reloading of frp configuration.

func Run

func Run(configPath string) error

Run executes frp service in background service process.

func ServiceNameOfClient added in v1.7.0

func ServiceNameOfClient(name string) string

func ShowPropertyDialog

func ShowPropertyDialog(displayName string)

ShowPropertyDialog shows up the service property dialog of the given service

func UninstallService

func UninstallService(name string, wait bool) error

UninstallService stops and removes the given service

func VerifyClientConfig added in v1.7.1

func VerifyClientConfig(path string) error

VerifyClientConfig validates the frp client config file

Types

type FrpClientSVCBService added in v1.15.0

type FrpClientSVCBService struct {
	*FrpClientService
	// contains filtered or unexported fields
}

func NewFrpClientSVCBService added in v1.15.0

func NewFrpClientSVCBService(cfgFile string) (*FrpClientSVCBService, error)

func (*FrpClientSVCBService) Run added in v1.15.0

func (s *FrpClientSVCBService) Run()

Run periodically resolves the server domain SVCB record and updates the config in an unsafe way.

func (*FrpClientSVCBService) Stop added in v1.15.0

func (s *FrpClientSVCBService) Stop(wait bool)

type FrpClientService added in v1.13.0

type FrpClientService struct {
	// contains filtered or unexported fields
}

func NewFrpClientService added in v1.13.0

func NewFrpClientService(cfgFile string) (*FrpClientService, error)

func (*FrpClientService) Done added in v1.16.0

func (s *FrpClientService) Done() <-chan struct{}

func (*FrpClientService) Reload added in v1.13.0

func (s *FrpClientService) Reload() error

Reload creates or updates or removes proxies of frpc.

func (*FrpClientService) Run added in v1.13.0

func (s *FrpClientService) Run()

Run starts frp client service in blocking mode.

func (*FrpClientService) Stop added in v1.13.0

func (s *FrpClientService) Stop(wait bool)

Stop closes all frp connections.

type Service added in v1.15.0

type Service interface {
	// Run service in blocking mode.
	Run()
	// Reload config file.
	Reload() error
	// Stop service and cleanup resources.
	Stop(wait bool)
	// Done returns a channel that's closed when work done.
	Done() <-chan struct{}
}

Jump to

Keyboard shortcuts

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