2015-12-05 21:55:45 +00:00
|
|
|
package app
|
|
|
|
|
2015-12-11 11:01:20 +00:00
|
|
|
// Context of a function call from proxy to app.
|
2015-12-10 22:55:39 +00:00
|
|
|
type Context interface {
|
|
|
|
CallerTag() string
|
|
|
|
}
|
|
|
|
|
2015-12-11 11:01:20 +00: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 10:00:10 +00:00
|
|
|
|
2015-12-11 11:01:20 +00:00
|
|
|
HasDnsCache() bool
|
|
|
|
DnsCache() DnsCache
|
2015-12-11 14:56:10 +00:00
|
|
|
|
|
|
|
HasPubsub() bool
|
|
|
|
Pubsub() Pubsub
|
2015-12-05 21:55:45 +00:00
|
|
|
}
|