mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-23 13:51:06 -05:00
Rename things in vpn package
This commit is contained in:
parent
66fe34ee32
commit
ed45ba2777
@ -55,7 +55,7 @@ func runInitialize(cmd *cobra.Command, args []string) error {
|
||||
|
||||
protoClient := proto.NewClient(*config.Provider.GCP.PCRs)
|
||||
defer protoClient.Close()
|
||||
vpnClient, err := vpn.NewWithDefaults()
|
||||
vpnClient, err := vpn.NewConfigurerWithDefaults()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -59,8 +59,8 @@ type Configurer struct {
|
||||
vpn vpn
|
||||
}
|
||||
|
||||
// NewWithDefaults creates a new vpn client.
|
||||
func NewWithDefaults() (*Configurer, error) {
|
||||
// NewConfigurerWithDefaults creates a new vpn client.
|
||||
func NewConfigurerWithDefaults() (*Configurer, error) {
|
||||
vpn, err := wgctrl.New()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -68,9 +68,9 @@ func NewWithDefaults() (*Configurer, error) {
|
||||
return &Configurer{netLink: newNetLink(), vpn: vpn}, nil
|
||||
}
|
||||
|
||||
// New creates a new vpn client with the provided
|
||||
// NewConfigurer creates a new vpn client with the provided
|
||||
// network link and vpn interface.
|
||||
func New(netLink networkLink, vpn vpn) (*Configurer, error) {
|
||||
func NewConfigurer(netLink networkLink, vpn vpn) (*Configurer, error) {
|
||||
return &Configurer{netLink: netLink, vpn: vpn}, nil
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func TestConfigurer(t *testing.T) {
|
||||
|
||||
link := newStubNetworkLink()
|
||||
vpn := newStubVPN()
|
||||
client, err := New(link, vpn)
|
||||
client, err := NewConfigurer(link, vpn)
|
||||
require.NoError(err)
|
||||
coordinatorPubKey, err := wgtypes.GenerateKey()
|
||||
require.NoError(err)
|
Loading…
Reference in New Issue
Block a user