open-consul/proto/private/pbautoconf/auto_config.go
Ronald 71fb0a723e
Copyright headers for missing files/folders (#16708)
* copyright headers for agent folder
2023-03-28 18:48:58 -04:00

31 lines
654 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package pbautoconf
import "time"
func (req *AutoConfigRequest) RequestDatacenter() string {
return req.Datacenter
}
func (req *AutoConfigRequest) IsRead() bool {
return false
}
func (req *AutoConfigRequest) AllowStaleRead() bool {
return false
}
func (req *AutoConfigRequest) TokenSecret() string {
return req.ConsulToken
}
func (req *AutoConfigRequest) SetTokenSecret(token string) {
req.ConsulToken = token
}
func (req *AutoConfigRequest) HasTimedOut(start time.Time, rpcHoldTimeout, _, _ time.Duration) (bool, error) {
return time.Since(start) > rpcHoldTimeout, nil
}