Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Token string
Store *state.Store
Runtime RuntimeAPI
Now func() time.Time
SnapshotSource logging.MachineSnapshotSource
SnapshotID func() string
}
type RuntimeAPI ¶
type RuntimeAPI interface {
Capabilities() []string
Snapshot() state.Snapshot
Install(context.Context, runtimeapi.Operation) (core.InstallResult, error)
Restart(context.Context, runtimeapi.Operation) error
Proxies(context.Context) (mihomo.Proxies, error)
SelectProxy(context.Context, runtimeapi.Operation, string, string) error
DelayGroup(context.Context, string, string, int) (mihomo.Delays, error)
DelayProxy(context.Context, string, string, int) (uint16, error)
Connections(context.Context) (mihomo.Connections, error)
CloseConnection(context.Context, runtimeapi.Operation, string) error
CloseAllConnections(context.Context, runtimeapi.Operation) error
Rules(context.Context) (mihomo.Rules, error)
RuleProviders(context.Context) (mihomo.RuleProviders, error)
UpdateRuleProvider(context.Context, runtimeapi.Operation, string) error
Stream(context.Context, mihomo.StreamKind, func(json.RawMessage) error) error
GeoIPStatus(context.Context) (geoip.Status, error)
LookupGeoIP(context.Context, []netip.Addr) ([]geoip.Record, error)
UpdateGeoIP(context.Context, runtimeapi.Operation) (geoip.Status, error)
SystemProxyStatus(context.Context) (protocol.SystemProxyStatus, error)
EnableSystemProxy(context.Context, runtimeapi.Operation, bool) (protocol.SystemProxyStatus, error)
DisableSystemProxy(context.Context, runtimeapi.Operation) (protocol.SystemProxyStatus, error)
TunStatus(context.Context) (protocol.TunStatus, error)
EnableTun(context.Context, runtimeapi.Operation, bool) (protocol.TunStatus, error)
DisableTun(context.Context, runtimeapi.Operation) (protocol.TunStatus, error)
}
Click to show internal directories.
Click to hide internal directories.