open-vault/command/agent/sink/mock/mock_sink.go
Vishal Nayak 779d49bab5
AgentCache: Properly compute auto-auth token (#6264)
* Properly compute auto-auth token

* Use inmem sink to track auto-auth token

* update debug statement

* Only add inmem sink if using auto-auth token is allowed
2019-02-20 02:11:05 -05:00

25 lines
333 B
Go

package mock
import (
"github.com/hashicorp/vault/command/agent/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
}