Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppExposer ¶
type AppExposer interface { Expose(peer peers.Peer, app peers.App, router messageRouter) error Unexpose(peer peers.Peer, app peers.App) error Apps() []ExposedApp Terminate(peer peers.Peer) error }
AppExposer is responsible for keeping track of which apps are registered and their endpoints exported
func NewDefaultAppExposer ¶
func NewDefaultAppExposer(portOpenerFactory PortOpenerFactory) AppExposer
NewDefaultAppExposer creates defaultAppExposer instances
type AppListerAdapter ¶
type AppListerAdapter struct {
// contains filtered or unexported fields
}
AppListerAdapter implements admin.appLister
func NewServerAppsListAdapter ¶
func NewServerAppsListAdapter(exposer AppExposer) *AppListerAdapter
NewServerAppsListAdapter creates ServerAppsListAdapter instances
func (*AppListerAdapter) Apps ¶
func (adapter *AppListerAdapter) Apps() ([]admin.AppListEntry, error)
Apps returns a list of apps
type ExposedApp ¶
ExposedApp represents an app exposed on the server along with the peer the app is exposed from
type PortOpenerFactory ¶
PortOpenerFactory is a factory interface for portOpener
func NewK8sServicePortOpenerFactory ¶
func NewK8sServicePortOpenerFactory( namespace string, selectors map[string]string, childFactory PortOpenerFactory, ) PortOpenerFactory
NewK8sServicePortOpenerFactory implements PortOpenerFactory as a decorator over existing PortOpenerFactory, that also creates kubernetes service for given opened port
func NewPerAppPortOpenerFactory ¶
func NewPerAppPortOpenerFactory(allocator ports.Allocator) PortOpenerFactory
NewPerAppPortOpenerFactory implements PortOpenerFactory for standard opened TCP connection
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server accepts Peers and opens ports for all the apps connected peers expose
func NewServer ¶
func NewServer(peerFactory peers.PeerFactory, appExposer AppExposer) *Server
NewServer creates Server instances