Functions for use with Endpoints

Product: PowerShell Universal
Version: 1.4.6

How can I configure a function definition within PU for use with any Endpoint that might be created with New-PSEndpoint? Must I create an entire module?