Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option struct { //transportServer id can be set,or random //this is the unique identifier of the service Id string //transportServer name,eg.srv.hello or api.hello Name string //random port //Random ports make you don’t need to care about specific port numbers, //which are more commonly used in internal services RandPort *[2]int //socket tcp ip:port address TcpAddress string //websocket ip:port address WssAddress string //websocket relative path address of websocket WssPath string //http service address HttpAddress string //buffSize to data tunnel if it's need BuffSize int //transportServer transport TransportServer transport.Server //error packet //It will affect the format of the data you return Err parcel.ErrorPackager //receive system signal Signal []os.Signal //wrapper some middleware //it's can be interrupt //just for request response Wrappers []handler.WrapperHandler //just for http request before or socket setup before Dog []handler.DogHandler //when transportServer exit,will do exit func Exit []func() //etcd config EtcdConfig *clientv3.Config //config options ConfigOpt []config.Options //service discover registry Registry registry.Registry //service discover endpoint Endpoint *endpoint.Endpoint //only need cors middleware on roc http api POST/DELETE/GET/PUT/OPTIONS method CorsOptions *cors.Options }
Click to show internal directories.
Click to hide internal directories.