Jiri Simsa | d7616c9 | 2015-03-24 23:44:30 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Vanadium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Matt Rosencrantz | 2b675f9 | 2015-03-05 12:52:50 -0800 | [diff] [blame] | 5 | package profiles |
| 6 | |
| 7 | import ( |
| 8 | "v.io/v23/context" |
| 9 | "v.io/v23/naming" |
Cosmos Nicolaou | aa87e29 | 2015-04-21 22:15:50 -0700 | [diff] [blame] | 10 | "v.io/v23/rpc" |
Asim Shankar | 99b18a7 | 2015-04-25 23:19:28 -0700 | [diff] [blame] | 11 | "v.io/v23/security" |
Matt Rosencrantz | 2b675f9 | 2015-03-05 12:52:50 -0800 | [diff] [blame] | 12 | |
Matt Rosencrantz | 94502cf | 2015-03-18 09:43:44 -0700 | [diff] [blame] | 13 | "v.io/x/ref/profiles/internal/rpc/stream/proxy" |
Matt Rosencrantz | 2b675f9 | 2015-03-05 12:52:50 -0800 | [diff] [blame] | 14 | ) |
| 15 | |
| 16 | // NewProxy creates a new Proxy that listens for network connections on the provided |
| 17 | // (network, address) pair and routes VC traffic between accepted connections. |
Asim Shankar | 99b18a7 | 2015-04-25 23:19:28 -0700 | [diff] [blame] | 18 | // |
| 19 | // auth encapsulates the authorization policy of the proxy - which |
| 20 | // servers it is willing to proxy for. |
| 21 | func NewProxy(ctx *context.T, spec rpc.ListenSpec, auth security.Authorizer, names ...string) (shutdown func(), endpoint naming.Endpoint, err error) { |
| 22 | return proxy.New(ctx, spec, auth, names...) |
Matt Rosencrantz | 2b675f9 | 2015-03-05 12:52:50 -0800 | [diff] [blame] | 23 | } |