mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-19 05:31:10 +02:00
* VAULT-15547 First pass at agent/proxy decoupling * VAULT-15547 Fix some imports * VAULT-15547 cases instead of string.Title * VAULT-15547 changelog * VAULT-15547 Fix some imports * VAULT-15547 some more dependency updates * VAULT-15547 More dependency paths * VAULT-15547 godocs for tests * VAULT-15547 godocs for tests * VAULT-15547 test package updates * VAULT-15547 test packages * VAULT-15547 add proxy to test packages * VAULT-15547 gitignore * VAULT-15547 address comments * VAULT-15547 Some typos and small fixes
28 lines
414 B
Go
28 lines
414 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package mock
|
|
|
|
import (
|
|
"github.com/hashicorp/vault/command/agentproxyshared/sink"
|
|
)
|
|
|
|
type mockSink struct {
|
|
token string
|
|
}
|
|
|
|
func NewSink(token string) sink.Sink {
|
|
return &mockSink{
|
|
token: token,
|
|
}
|
|
}
|
|
|
|
func (m *mockSink) WriteToken(token string) error {
|
|
m.token = token
|
|
return nil
|
|
}
|
|
|
|
func (m *mockSink) Token() string {
|
|
return m.token
|
|
}
|