Documentation ¶
Index ¶
- Variables
- func ConnectGRPC(address string, timeoutDuration time.Duration) (conn *grpc.ClientConn, err error)
- type HandlerServiceClient
- func (h *HandlerServiceClient) AddInbound(inbound *core.InboundHandlerConfig) error
- func (h *HandlerServiceClient) AddUser(user *protocol.User) error
- func (h *HandlerServiceClient) AlterInbound(req *command.AlterInboundRequest) error
- func (h *HandlerServiceClient) DelUser(email string) error
- func (h *HandlerServiceClient) RemoveInbound(tag string) error
- type StatsServiceClient
Constants ¶
This section is empty.
Variables ¶
View Source
var Config *viper.Viper
Config is a viper instance We use single viper instance in rayagent
View Source
var Validator *validator.Validate
Validator is a globals validator
Functions ¶
func ConnectGRPC ¶
Types ¶
type HandlerServiceClient ¶
type HandlerServiceClient struct { command.HandlerServiceClient // contains filtered or unexported fields }
func NewHandlerServiceClient ¶
func NewHandlerServiceClient(client *grpc.ClientConn, inboundTag string) *HandlerServiceClient
func (*HandlerServiceClient) AddInbound ¶
func (h *HandlerServiceClient) AddInbound(inbound *core.InboundHandlerConfig) error
func (*HandlerServiceClient) AddUser ¶
func (h *HandlerServiceClient) AddUser(user *protocol.User) error
func (*HandlerServiceClient) AlterInbound ¶
func (h *HandlerServiceClient) AlterInbound(req *command.AlterInboundRequest) error
func (*HandlerServiceClient) DelUser ¶
func (h *HandlerServiceClient) DelUser(email string) error
func (*HandlerServiceClient) RemoveInbound ¶
func (h *HandlerServiceClient) RemoveInbound(tag string) error
type StatsServiceClient ¶
type StatsServiceClient struct {
statsservice.StatsServiceClient
}
func NewStatsServiceClient ¶
func NewStatsServiceClient(client *grpc.ClientConn) *StatsServiceClient
func (*StatsServiceClient) GetUserTraffic ¶
func (s *StatsServiceClient) GetUserTraffic(email string) (uint64, error)
Click to show internal directories.
Click to hide internal directories.