mirror of
https://github.com/fatedier/frp.git
synced 2025-07-10 07:49:34 +07:00
Add docs for common config fields & sessions
Now that the common configuration objects and session objects are part of a public API, they need to be documented in a way that can be read with godoc. This commit should lead to easier development with FRP as a library.
This commit is contained in:
@ -34,6 +34,7 @@ import (
|
||||
fmux "github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
// Service is a client service.
|
||||
type Service struct {
|
||||
// uniq id got from frps, attach it in loginMsg
|
||||
runId string
|
||||
@ -58,6 +59,7 @@ type Service struct {
|
||||
closedCh chan int
|
||||
}
|
||||
|
||||
// NewService creates a new client service with the given configuration.
|
||||
func NewService(cfg config.ClientCommonConf, pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf, cfgFile string) (svr *Service, err error) {
|
||||
svr = &Service{
|
||||
cfg: cfg,
|
||||
|
Reference in New Issue
Block a user