blob: 1ae6c5133a1a8de09cca90f4b12d300b51b68252 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stress
import (
"v.io/v23/security/access"
)
type SumArg struct {
ABool bool
AInt64 int64
AListOfBytes []byte
}
type SumStats struct {
SumCount uint64
SumStreamCount uint64
BytesRecv uint64
BytesSent uint64
}
type Stress interface {
// Echo returns the payload that it receives.
Echo(Payload []byte) ([]byte | error) {access.Read}
// Do returns the checksum of the payload that it receives.
Sum(arg SumArg) ([]byte | error) {access.Read}
// DoStream returns the checksum of the payload that it receives via the stream.
SumStream() stream<SumArg,[]byte> error {access.Read}
// GetSumStats returns the stats on the Sum calls that the server received.
GetSumStats() (SumStats | error) {access.Read}
// Stop stops the server.
Stop() error {access.Admin}
}