core: v2ray.com/core/app/commander Index | Files

package commander

import "v2ray.com/core/app/commander"

Index

Package Files

commander.go config.pb.go errors.generated.go outbound.go service.go

Variables

var File_v2ray_com_core_app_commander_config_proto protoreflect.FileDescriptor

type Commander Uses

type Commander struct {
    sync.Mutex
    // contains filtered or unexported fields
}

Commander is a V2Ray feature that provides gRPC methods to external clients.

func NewCommander Uses

func NewCommander(ctx context.Context, config *Config) (*Commander, error)

NewCommander creates a new Commander based on the given config.

func (*Commander) Close Uses

func (c *Commander) Close() error

Close implements common.Closable.

func (*Commander) Start Uses

func (c *Commander) Start() error

Start implements common.Runnable.

func (*Commander) Type Uses

func (c *Commander) Type() interface{}

Type implements common.HasType.

type Config Uses

type Config struct {

    // Tag of the outbound handler that handles grpc connections.
    Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
    // Services that supported by this server. All services must implement Service interface.
    Service []*serial.TypedMessage `protobuf:"bytes,2,rep,name=service,proto3" json:"service,omitempty"`
    // contains filtered or unexported fields
}

Config is the settings for Commander.

func (*Config) Descriptor Uses

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetService Uses

func (x *Config) GetService() []*serial.TypedMessage

func (*Config) GetTag Uses

func (x *Config) GetTag() string

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 Outbound Uses

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

Outbound is a outbound.Handler that handles gRPC connections.

func (*Outbound) Close Uses

func (co *Outbound) Close() error

Close implements common.Closable.

func (*Outbound) Dispatch Uses

func (co *Outbound) Dispatch(ctx context.Context, link *transport.Link)

Dispatch implements outbound.Handler.

func (*Outbound) Start Uses

func (co *Outbound) Start() error

Start implements common.Runnable.

func (*Outbound) Tag Uses

func (co *Outbound) Tag() string

Tag implements outbound.Handler.

type OutboundListener Uses

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

OutboundListener is a net.Listener for listening gRPC connections.

func (*OutboundListener) Accept Uses

func (l *OutboundListener) Accept() (net.Conn, error)

Accept implements net.Listener.

func (*OutboundListener) Addr Uses

func (l *OutboundListener) Addr() net.Addr

Addr implements net.Listener.

func (*OutboundListener) Close Uses

func (l *OutboundListener) Close() error

Close implement net.Listener.

type Service Uses

type Service interface {
    // Register registers the service itself to a gRPC server.
    Register(*grpc.Server)
}

Service is a Commander service.

Package commander imports 16 packages (graph) and is imported by 5 packages. Updated 2020-06-16. Refresh now. Tools for package owners.