blob: dd8906871b0c21c31aeacee12f19f43607803be7 [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 Arg struct {
ABool bool
AInt64 int64
AListOfBytes []byte
}
type Stats struct {
SumCount uint64
SumStreamCount uint64
}
type Stress interface {
// Do returns the checksum of the payload that it receives.
Sum(arg Arg) ([]byte | error) {access.Read}
// DoStream returns the checksum of the payload that it receives via the stream.
SumStream() stream<Arg,[]byte> error {access.Read}
// GetStats returns the stats on the calls that the server received.
GetStats() (Stats | error) {access.Read}
// Stop stops the server.
Stop() error {access.Admin}
}