mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
fix(client): Add reason to unregistration to skip persistence
This commit is contained in:
@@ -61,3 +61,15 @@ type Client interface {
|
||||
// SetUnavailable sets the client to unavailable.
|
||||
SetUnavailable()
|
||||
}
|
||||
|
||||
// UnregisterReason describes the context for unregistering a client instance.
|
||||
type UnregisterReason string
|
||||
|
||||
const (
|
||||
// UnregisterReasonReload indicates a full reload is replacing the client.
|
||||
UnregisterReasonReload UnregisterReason = "reload"
|
||||
// UnregisterReasonShutdown indicates the service is shutting down.
|
||||
UnregisterReasonShutdown UnregisterReason = "shutdown"
|
||||
// UnregisterReasonAuthFileRemoved indicates the underlying auth file was deleted.
|
||||
UnregisterReasonAuthFileRemoved UnregisterReason = "auth-file-removed"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user