gateway_registry

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGatewayConnection

func GetGatewayConnection(service GwServiceType, hwId string) (*grpc.ClientConn, context.Context, error)

GetGatewayConnection gets a connection to the SyncRPC HTTP server who can forward the message to the corresponding gateway.

Returns a connection and a context that should be based on for rpc calls on this connection. The context will put the Gatewayid in its metadata, which will be surfaced as HTTP/2 headers.

func GetServiceAddressForGateway

func GetServiceAddressForGateway(hwId string) (string, error)

GetServiceAddressForGateway returns the ip addr for the SyncRPCHTTPServer instance, which is in the same process of the Dispatcher grpc server who has an open bidirectional stream with the gateway with hwId.

func SetPort

func SetPort(port int) error

SetPort sets the port of http_server. If a port is already set, this overrides the previous setting.

Types

type GwServiceType

type GwServiceType string
const (
	// Gateway services
	GwMobilityd           GwServiceType = "mobilityd"
	GwMagmad              GwServiceType = "magmad"
	GwEnodebd             GwServiceType = "enodebd"
	GwPipelined           GwServiceType = "pipelined"
	GwSubscriberDB        GwServiceType = "subscriberdb"
	GwS6aService          GwServiceType = "s6a_service"
	GwSgsService          GwServiceType = "sgs_service"
	GwSessiondService     GwServiceType = "sessiond"
	GwSpgwService         GwServiceType = "spgw_service"
	GwAbortSessionService GwServiceType = "abort_session_service"
	GwAAAService          GwServiceType = "aaa_server"

	// SyncRPC gateway header key
	GatewayIdHeaderKey = "Gatewayid"

	HttpServerAddressPort = 9080
)

func ListAllGwServices

func ListAllGwServices() []GwServiceType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL