Documentation
¶
Index ¶
- Constants
- func GetDiscoveryConn() discovery.Conn
- func GetKeyValue() discovery.KeyValue
- func GetServiceRegistrar() grpc.ServiceRegistrar
- func GetSvcDiscoveryRegistry() discovery.SvcDiscoveryRegistry
- func SetBroadcastAddress(secret string, fn BroadcastAddressProvider)
- func SetContextAdminFunc(fn func(ctx context.Context) bool)
- func SetLocalTarget(addr string)
- type BroadcastAddressFunc
- type BroadcastAddressProvider
- type InvokeRequest
- type InvokeResponse
Constants ¶
View Source
const BroadcastPath = "/internal/api_invoke_rpc"
Variables ¶
This section is empty.
Functions ¶
func GetDiscoveryConn ¶
func GetKeyValue ¶
func GetServiceRegistrar ¶
func GetServiceRegistrar() grpc.ServiceRegistrar
func GetSvcDiscoveryRegistry ¶
func GetSvcDiscoveryRegistry() discovery.SvcDiscoveryRegistry
func SetBroadcastAddress ¶
func SetBroadcastAddress(secret string, fn BroadcastAddressProvider)
SetBroadcastAddress enables cross-instance calls: GetConns returns the local in-process connection plus one remote connection per address reported by fn. secret must equal the peers' share.secret, which their RpcInvoke endpoint checks.
func SetContextAdminFunc ¶
func SetLocalTarget ¶
func SetLocalTarget(addr string)
Types ¶
type BroadcastAddressFunc ¶
type BroadcastAddressFunc = BroadcastAddressProvider
BroadcastAddressFunc is kept as a source-compatible alias for older callers.
type BroadcastAddressProvider ¶
BroadcastAddressProvider returns the http api addresses of the other in-process-mode instances, excluding this one; the local instance is always invoked in memory.
type InvokeRequest ¶
type InvokeRequest struct {
Service string `json:"service"`
Method string `json:"method"`
Secret string `json:"secret"`
OpUserID string `json:"op_user_id"`
Admin bool `json:"admin"`
Request []byte `json:"request"`
}
InvokeRequest must match the request type of internalApi.RpcInvoke.
Click to show internal directories.
Click to hide internal directories.