Remove unused methods from template

This commit is contained in:
Chris S. Kim 2022-10-18 16:02:41 -04:00 committed by Chris S. Kim
parent d562d363fc
commit 3d05a8e9af
1 changed files with 0 additions and 20 deletions

View File

@ -515,12 +515,6 @@ func (msg *%[1]s) HasTimedOut(start time.Time, rpcHoldTimeout time.Duration, a t
return time.Since(start) > rpcHoldTimeout, nil return time.Since(start) > rpcHoldTimeout, nil
} }
// Timeout implements structs.RPCInfo
func (msg *%[1]s) Timeout(rpcHoldTimeout time.Duration, a time.Duration, b time.Duration) time.Duration {
// TODO(peering): figure out read semantics here
return rpcHoldTimeout
}
// SetTokenSecret implements structs.RPCInfo // SetTokenSecret implements structs.RPCInfo
func (msg *%[1]s) SetTokenSecret(s string) { func (msg *%[1]s) SetTokenSecret(s string) {
// TODO(peering): figure out read semantics here // TODO(peering): figure out read semantics here
@ -558,12 +552,6 @@ func (msg *%[1]s) HasTimedOut(start time.Time, rpcHoldTimeout time.Duration, a t
return time.Since(start) > rpcHoldTimeout, nil return time.Since(start) > rpcHoldTimeout, nil
} }
// Timeout implements structs.RPCInfo
func (msg *%[1]s) Timeout(rpcHoldTimeout time.Duration, a time.Duration, b time.Duration) time.Duration {
// TODO(peering): figure out write semantics here
return rpcHoldTimeout
}
// SetTokenSecret implements structs.RPCInfo // SetTokenSecret implements structs.RPCInfo
func (msg *%[1]s) SetTokenSecret(s string) { func (msg *%[1]s) SetTokenSecret(s string) {
// TODO(peering): figure out write semantics here // TODO(peering): figure out write semantics here
@ -615,14 +603,6 @@ func (msg *%[1]s) HasTimedOut(start time.Time, rpcHoldTimeout time.Duration, a t
return msg.%[2]s.HasTimedOut(start, rpcHoldTimeout, a, b) return msg.%[2]s.HasTimedOut(start, rpcHoldTimeout, a, b)
} }
// Timeout implements structs.RPCInfo
func (msg *%[1]s) Timeout(rpcHoldTimeout time.Duration, a time.Duration, b time.Duration) time.Duration {
if msg == nil || msg.%[2]s == nil {
return 0
}
return msg.%[2]s.Timeout(rpcHoldTimeout, a, b)
}
// SetTokenSecret implements structs.RPCInfo // SetTokenSecret implements structs.RPCInfo
func (msg *%[1]s) SetTokenSecret(s string) { func (msg *%[1]s) SetTokenSecret(s string) {
// TODO: initialize if nil // TODO: initialize if nil