blob: cf7bff1770d94b20d8f5d8b359a9aa28cbb59a41 [file] [log] [blame]
Jiri Simsa756772c2015-03-25 15:40:54 -07001// Copyright 2015 The Vanadium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Jungho Ahn48d43072015-02-23 18:50:27 -08005package stress
6
7import (
8 "v.io/v23/services/security/access"
9)
10
11type Arg struct {
12 ABool bool
13 AInt64 int64
14 AListOfBytes []byte
15}
16
17type Stats struct {
18 SumCount uint64
19 SumStreamCount uint64
20}
21
22type Stress interface {
23 // Do returns the checksum of the payload that it receives.
24 Sum(arg Arg) ([]byte | error) {access.Read}
25
26 // DoStream returns the checksum of the payload that it receives via the stream.
27 SumStream() stream<Arg,[]byte> error {access.Read}
28
29 // GetStats returns the stats on the calls that the server received.
30 GetStats() (Stats | error) {access.Read}
31
32 // Stop stops the server.
33 Stop() error {access.Admin}
34}