MCPcopy
hub / github.com/MHSanaei/3x-ui / Runtime

Interface Runtime

internal/web/runtime/runtime.go:9–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7)
8
9type Runtime interface {
10 Name() string
11
12 AddInbound(ctx context.Context, ib *model.Inbound) error
13 DelInbound(ctx context.Context, ib *model.Inbound) error
14 UpdateInbound(ctx context.Context, oldIb, newIb *model.Inbound) error
15
16 AddUser(ctx context.Context, ib *model.Inbound, userMap map[string]any) error
17 RemoveUser(ctx context.Context, ib *model.Inbound, email string) error
18
19 // Per-client operations that route through the node's clients API on
20 // Remote (instead of pushing the whole inbound) so the node applies
21 // per-user xray API calls without a DelInbound+AddInbound cycle.
22 UpdateUser(ctx context.Context, ib *model.Inbound, email string, payload model.Client) error
23 DeleteUser(ctx context.Context, ib *model.Inbound, email string) error
24 AddClient(ctx context.Context, ib *model.Inbound, client model.Client) error
25
26 RestartXray(ctx context.Context) error
27
28 ResetClientTraffic(ctx context.Context, ib *model.Inbound, email string) error
29 ResetInboundTraffic(ctx context.Context, ib *model.Inbound) error
30 ResetAllTraffics(ctx context.Context) error
31}

Callers 65

delInboundClientsMethod · 0.95
UpdateInboundClientMethod · 0.95
walkPackagesFunction · 0.65
IsPostgresFunction · 0.65
DialectFunction · 0.65
MigrateDataFunction · 0.65
writeFileAtomicFunction · 0.65
AddInboundMethod · 0.65
addInboundMethod · 0.65
importInboundMethod · 0.65
addInboundReconcilingFunction · 0.65

Implementers 3

fakeNodeRuntimeinternal/web/service/node_bulk_dispatc
Localinternal/web/runtime/local.go
Remoteinternal/web/runtime/remote.go

Calls

no outgoing calls

Tested by

no test coverage detected