blob: 9b4a35000584a1dd7616a26b4f2b97e6fe4c0ee9 [file] [log] [blame]
Jiri Simsad7616c92015-03-24 23:44:30 -07001// 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 Rosencrantz2b675f92015-03-05 12:52:50 -08005package profiles
6
7import (
8 "v.io/v23/context"
9 "v.io/v23/naming"
Cosmos Nicolaouaa87e292015-04-21 22:15:50 -070010 "v.io/v23/rpc"
Asim Shankar99b18a72015-04-25 23:19:28 -070011 "v.io/v23/security"
Matt Rosencrantz2b675f92015-03-05 12:52:50 -080012
Matt Rosencrantz94502cf2015-03-18 09:43:44 -070013 "v.io/x/ref/profiles/internal/rpc/stream/proxy"
Matt Rosencrantz2b675f92015-03-05 12:52:50 -080014)
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 Shankar99b18a72015-04-25 23:19:28 -070018//
19// auth encapsulates the authorization policy of the proxy - which
20// servers it is willing to proxy for.
21func 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 Rosencrantz2b675f92015-03-05 12:52:50 -080023}