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 Wrappers []handler.WrapperHandler //when transportServer exit,will do exit func Exit []func() //it must be unique in all of your handler path ApiPrefix string //etcd config EtcdConfig *clientv3.Config //config options ConfigOpt []config.Options //service discover registry Registry registry.Registry //service discover endpoint Endpoint *endpoint.Endpoint //only need one middleware on roc http api POST/DELETE method HttpMiddleware []handler.HttpInterceptor }
Click to show internal directories.
Click to hide internal directories.