You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/proto/private/pbautoconf/auto_config.go

31 lines
654 B

// 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
}