Documentation ¶
Index ¶
- Variables
- func StartClient(remote string, ver uint32) error
- func StartServer(address string) error
- func Update()
- func WaitStopSignal(oc OnClose)
- type FileContent
- type FileVersion
- type OnAppCloseAndUpdate
- type OnClose
- type UpgradeServer
- func (s *UpgradeServer) GetLastedVersion(name string) uint32
- func (s *UpgradeServer) HandleError(current *stnet.CurrentContent, err error)
- func (s *UpgradeServer) HandleReq(current *stnet.CurrentContent, msg *stnet.ReqProto)
- func (s *UpgradeServer) HandleRsp(current *stnet.CurrentContent, msg *stnet.RspProto)
- func (s *UpgradeServer) HashProcessor(current *stnet.CurrentContent) (processorID int)
- func (s *UpgradeServer) Loop()
- func (s *UpgradeServer) UpdateFile(name string, index uint64) FileContent
Constants ¶
This section is empty.
Variables ¶
View Source
var (
LOG = stlog.NewFileLoggerWithoutTerm("update.log")
)
Functions ¶
func StartClient ¶
func StartServer ¶
func WaitStopSignal ¶
func WaitStopSignal(oc OnClose)
Types ¶
type FileContent ¶
type FileVersion ¶
type OnAppCloseAndUpdate ¶
type OnAppCloseAndUpdate func() error
type UpgradeServer ¶
type UpgradeServer struct { }
func (*UpgradeServer) GetLastedVersion ¶
func (s *UpgradeServer) GetLastedVersion(name string) uint32
rpc functions
func (*UpgradeServer) HandleError ¶
func (s *UpgradeServer) HandleError(current *stnet.CurrentContent, err error)
func (*UpgradeServer) HandleReq ¶
func (s *UpgradeServer) HandleReq(current *stnet.CurrentContent, msg *stnet.ReqProto)
func (*UpgradeServer) HandleRsp ¶
func (s *UpgradeServer) HandleRsp(current *stnet.CurrentContent, msg *stnet.RspProto)
func (*UpgradeServer) HashProcessor ¶
func (s *UpgradeServer) HashProcessor(current *stnet.CurrentContent) (processorID int)
func (*UpgradeServer) Loop ¶
func (s *UpgradeServer) Loop()
func (*UpgradeServer) UpdateFile ¶
func (s *UpgradeServer) UpdateFile(name string, index uint64) FileContent
Click to show internal directories.
Click to hide internal directories.