v2ray-core: github.com/v2ray/v2ray-core/app/stats Index | Files | Directories

package stats

import "github.com/v2ray/v2ray-core/app/stats"

Index

Package Files

channel.go config.pb.go counter.go errors.generated.go stats.go

Variables

var File_app_stats_config_proto protoreflect.FileDescriptor

type Channel Uses

type Channel struct {
    // contains filtered or unexported fields
}

Channel is an implementation of stats.Channel.

func NewChannel Uses

func NewChannel(config *ChannelConfig) *Channel

NewChannel creates an instance of Statistics Channel.

func (*Channel) Close Uses

func (c *Channel) Close() error

Close implements common.Closable.

func (*Channel) Publish Uses

func (c *Channel) Publish(ctx context.Context, msg interface{})

Publish implements stats.Channel.

func (*Channel) Running Uses

func (c *Channel) Running() bool

Running returns whether the channel is running.

func (*Channel) Start Uses

func (c *Channel) Start() error

Start implements common.Runnable.

func (*Channel) Subscribe Uses

func (c *Channel) Subscribe() (chan interface{}, error)

Subscribe implements stats.Channel.

func (*Channel) Subscribers Uses

func (c *Channel) Subscribers() []chan interface{}

Subscribers implements stats.Channel.

func (*Channel) Unsubscribe Uses

func (c *Channel) Unsubscribe(subscriber chan interface{}) error

Unsubscribe implements stats.Channel.

type ChannelConfig Uses

type ChannelConfig struct {
    Blocking        bool  `protobuf:"varint,1,opt,name=Blocking,proto3" json:"Blocking,omitempty"`
    SubscriberLimit int32 `protobuf:"varint,2,opt,name=SubscriberLimit,proto3" json:"SubscriberLimit,omitempty"`
    BufferSize      int32 `protobuf:"varint,3,opt,name=BufferSize,proto3" json:"BufferSize,omitempty"`
    // contains filtered or unexported fields
}

func (*ChannelConfig) Descriptor Uses

func (*ChannelConfig) Descriptor() ([]byte, []int)

Deprecated: Use ChannelConfig.ProtoReflect.Descriptor instead.

func (*ChannelConfig) GetBlocking Uses

func (x *ChannelConfig) GetBlocking() bool

func (*ChannelConfig) GetBufferSize Uses

func (x *ChannelConfig) GetBufferSize() int32

func (*ChannelConfig) GetSubscriberLimit Uses

func (x *ChannelConfig) GetSubscriberLimit() int32

func (*ChannelConfig) ProtoMessage Uses

func (*ChannelConfig) ProtoMessage()

func (*ChannelConfig) ProtoReflect Uses

func (x *ChannelConfig) ProtoReflect() protoreflect.Message

func (*ChannelConfig) Reset Uses

func (x *ChannelConfig) Reset()

func (*ChannelConfig) String Uses

func (x *ChannelConfig) String() string

type Config Uses

type Config struct {
    // contains filtered or unexported fields
}

func (*Config) Descriptor Uses

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) ProtoReflect Uses

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset Uses

func (x *Config) Reset()

func (*Config) String Uses

func (x *Config) String() string

type Counter Uses

type Counter struct {
    // contains filtered or unexported fields
}

Counter is an implementation of stats.Counter.

func (*Counter) Add Uses

func (c *Counter) Add(delta int64) int64

Add implements stats.Counter.

func (*Counter) Set Uses

func (c *Counter) Set(newValue int64) int64

Set implements stats.Counter.

func (*Counter) Value Uses

func (c *Counter) Value() int64

Value implements stats.Counter.

type Manager Uses

type Manager struct {
    // contains filtered or unexported fields
}

Manager is an implementation of stats.Manager.

func NewManager Uses

func NewManager(ctx context.Context, config *Config) (*Manager, error)

NewManager creates an instance of Statistics Manager.

func (*Manager) Close Uses

func (m *Manager) Close() error

Close implement common.Closable.

func (*Manager) GetChannel Uses

func (m *Manager) GetChannel(name string) stats.Channel

GetChannel implements stats.Manager.

func (*Manager) GetCounter Uses

func (m *Manager) GetCounter(name string) stats.Counter

GetCounter implements stats.Manager.

func (*Manager) RegisterChannel Uses

func (m *Manager) RegisterChannel(name string) (stats.Channel, error)

RegisterChannel implements stats.Manager.

func (*Manager) RegisterCounter Uses

func (m *Manager) RegisterCounter(name string) (stats.Counter, error)

RegisterCounter implements stats.Manager.

func (*Manager) Start Uses

func (m *Manager) Start() error

Start implements common.Runnable.

func (*Manager) Type Uses

func (*Manager) Type() interface{}

Type implements common.HasType.

func (*Manager) UnregisterChannel Uses

func (m *Manager) UnregisterChannel(name string) error

UnregisterChannel implements stats.Manager.

func (*Manager) UnregisterCounter Uses

func (m *Manager) UnregisterCounter(name string) error

UnregisterCounter implements stats.Manager.

func (*Manager) VisitCounters Uses

func (m *Manager) VisitCounters(visitor func(string, stats.Counter) bool)

VisitCounters calls visitor function on all managed counters.

Directories

PathSynopsis
command

Package stats imports 10 packages (graph). Updated 2020-10-15. Refresh now. Tools for package owners.