2015-12-05 16:55:45 -05:00
|
|
|
package app
|
|
|
|
|
2015-12-11 06:01:20 -05:00
|
|
|
// Context of a function call from proxy to app.
|
2015-12-10 17:55:39 -05:00
|
|
|
type Context interface {
|
|
|
|
CallerTag() string
|
|
|
|
}
|
|
|
|
|
2015-12-11 06:01:20 -05:00
|
|
|
// A Space contains all apps that may be available in a V2Ray runtime.
|
|
|
|
// Caller must check the availability of an app by calling HasXXX before getting its instance.
|
|
|
|
type Space interface {
|
|
|
|
HasPacketDispatcher() bool
|
|
|
|
PacketDispatcher() PacketDispatcher
|
2015-12-06 05:00:10 -05:00
|
|
|
|
2015-12-11 06:01:20 -05:00
|
|
|
HasDnsCache() bool
|
|
|
|
DnsCache() DnsCache
|
2015-12-11 09:56:10 -05:00
|
|
|
|
|
|
|
HasPubsub() bool
|
|
|
|
Pubsub() Pubsub
|
2015-12-05 16:55:45 -05:00
|
|
|
}
|