github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/network_stats.go (about)

     1  // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
     2  //   Input file: avdl/keybase1/network_stats.avdl
     3  
     4  package keybase1
     5  
     6  import (
     7  	"fmt"
     8  	"github.com/keybase/go-framed-msgpack-rpc/rpc"
     9  )
    10  
    11  type NetworkSource int
    12  
    13  const (
    14  	NetworkSource_LOCAL  NetworkSource = 0
    15  	NetworkSource_REMOTE NetworkSource = 1
    16  )
    17  
    18  func (o NetworkSource) DeepCopy() NetworkSource { return o }
    19  
    20  var NetworkSourceMap = map[string]NetworkSource{
    21  	"LOCAL":  0,
    22  	"REMOTE": 1,
    23  }
    24  
    25  var NetworkSourceRevMap = map[NetworkSource]string{
    26  	0: "LOCAL",
    27  	1: "REMOTE",
    28  }
    29  
    30  func (e NetworkSource) String() string {
    31  	if v, ok := NetworkSourceRevMap[e]; ok {
    32  		return v
    33  	}
    34  	return fmt.Sprintf("%v", int(e))
    35  }
    36  
    37  type InstrumentationStat struct {
    38  	Tag       string       `codec:"t" json:"tag"`
    39  	NumCalls  int          `codec:"n" json:"numCalls"`
    40  	Ctime     Time         `codec:"c" json:"ctime"`
    41  	Mtime     Time         `codec:"m" json:"mtime"`
    42  	AvgDur    DurationMsec `codec:"ad" json:"avgDur"`
    43  	MaxDur    DurationMsec `codec:"xd" json:"maxDur"`
    44  	MinDur    DurationMsec `codec:"nd" json:"minDur"`
    45  	TotalDur  DurationMsec `codec:"td" json:"totalDur"`
    46  	AvgSize   int64        `codec:"as" json:"avgSize"`
    47  	MaxSize   int64        `codec:"xs" json:"maxSize"`
    48  	MinSize   int64        `codec:"ns" json:"minSize"`
    49  	TotalSize int64        `codec:"ts" json:"totalSize"`
    50  }
    51  
    52  func (o InstrumentationStat) DeepCopy() InstrumentationStat {
    53  	return InstrumentationStat{
    54  		Tag:       o.Tag,
    55  		NumCalls:  o.NumCalls,
    56  		Ctime:     o.Ctime.DeepCopy(),
    57  		Mtime:     o.Mtime.DeepCopy(),
    58  		AvgDur:    o.AvgDur.DeepCopy(),
    59  		MaxDur:    o.MaxDur.DeepCopy(),
    60  		MinDur:    o.MinDur.DeepCopy(),
    61  		TotalDur:  o.TotalDur.DeepCopy(),
    62  		AvgSize:   o.AvgSize,
    63  		MaxSize:   o.MaxSize,
    64  		MinSize:   o.MinSize,
    65  		TotalSize: o.TotalSize,
    66  	}
    67  }
    68  
    69  type NetworkStatsInterface interface {
    70  }
    71  
    72  func NetworkStatsProtocol(i NetworkStatsInterface) rpc.Protocol {
    73  	return rpc.Protocol{
    74  		Name:    "keybase.1.NetworkStats",
    75  		Methods: map[string]rpc.ServeHandlerDescription{},
    76  	}
    77  }
    78  
    79  type NetworkStatsClient struct {
    80  	Cli rpc.GenericClient
    81  }