CN116248571A - Routing registration method and device of gin framework, electronic equipment and medium - Google Patents

Routing registration method and device of gin framework, electronic equipment and medium Download PDF

Info

Publication number
CN116248571A
CN116248571A CN202211647206.4A CN202211647206A CN116248571A CN 116248571 A CN116248571 A CN 116248571A CN 202211647206 A CN202211647206 A CN 202211647206A CN 116248571 A CN116248571 A CN 116248571A
Authority
CN
China
Prior art keywords
controller
gin
route
name
registration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211647206.4A
Other languages
Chinese (zh)
Inventor
严旭
田野
何世伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Luyi Technology Co ltd
Original Assignee
Chengdu Luyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Luyi Technology Co ltd filed Critical Chengdu Luyi Technology Co ltd
Priority to CN202211647206.4A priority Critical patent/CN116248571A/en
Publication of CN116248571A publication Critical patent/CN116248571A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application relates to a routing registration method, a device, electronic equipment and a medium of a gin framework, wherein the method comprises the following steps: initializing at least one controller of a gin frame and acquiring a memory address of the controller; based on a reflection mechanism, acquiring routing information contained in each controller according to the memory address, wherein the routing information comprises a controller name and at least one method information; and carrying out route registration on the route information so as to realize the route registration of the gin framework. According to the method and the device, automatic registration of the route is realized according to the naming rule of the controller, the efficiency of route registration is greatly improved, and the labor and time cost of route registration are remarkably saved; meanwhile, decoupling of service codes and route registration codes is realized, development flow is standardized, and development efficiency is improved.

Description

Routing registration method and device of gin framework, electronic equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for registering a gin frame route.
Background
At present, each interface needs to be registered manually before the gin framework is started, and a processing method is provided for each route, so that codes are too bulky, business codes and route registration codes are mutually inserted, the development complexity is increased, and the collaborative development difficulty is increased.
Disclosure of Invention
Aiming at the situation, the embodiment of the application provides a routing registration method, a device, electronic equipment and a medium of a gin framework, so as to overcome or at least partially overcome the defects of the prior art.
In a first aspect, an embodiment of the present application provides a method for registering a route of a gin frame, where the method is performed by a registration server, and the method includes:
initializing at least one controller of a gin frame and acquiring a memory address of the controller;
based on a reflection mechanism, acquiring routing information contained in each controller according to the memory address, wherein the routing information comprises a controller name and at least one method information;
and carrying out route registration on the route information so as to realize the route registration of the gin framework.
In a second aspect, a further embodiment of the present application provides a routing registration device of a gin frame, where the device may deploy a registration server, for implementing the foregoing method for registering a gin frame by using a route.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of any of the above.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform any of the methods described above.
The method adopted by the embodiment of the application has the following beneficial effects:
the application provides a routing registration method of a gin frame, which is characterized in that when a gin item is started, a controller is initialized, a memory address of the controller is obtained, then based on a reflection mechanism, information including a controller name, a method name and the like is obtained from the controller according to the memory address of the controller, routing information is formed by the information, and finally, routing registration is automatically carried out according to the routing information, so that the routing registration of the gin frame is completed. According to the method and the device, the controller information is acquired when the project based on the gin framework is started, automatic registration of the route is realized according to the naming rule, and compared with the current situation that each interface needs to be registered manually in the prior art, the efficiency of route registration is greatly improved, and the labor and time cost of route registration are remarkably saved; meanwhile, decoupling of the service code and the route registration code is realized, and when project development is carried out, developers only need to consider the service logic responsible for themselves, so that the collaborative development of multiple persons is more convenient, the conflict problem of version control tools and the like do not need to be considered, the development flow is standardized, and the development efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 shows a flow diagram of a route registration method for gin frameworks according to one embodiment of the present application;
fig. 2 shows a flow diagram of a route registration method of gin frameworks according to another embodiment of the present application;
fig. 3 shows a schematic diagram of a route registration device of a gin framework according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
The Go language is a completely new programming language introduced by google, which can reduce the complexity of code without compromising the performance of the application. The Gin frame is a micro-frame based on go language, has the characteristics of elegant encapsulation, friendly API, definite source code annotation, rapidness, flexibility, convenient fault tolerance and the like. However, at present, each interface needs to be registered manually before the gin framework is started, and a processing method is provided for each route, so that codes are too bulky, business codes and route registration codes are mutually inserted, the development complexity is increased, and the collaborative development difficulty is increased.
In this regard, the present application is specifically proposed, fig. 1 shows a route registration method according to a gin framework of the present application, the method being executed by a registration server, and as can be seen from fig. 1, the present application includes at least steps S110 to S130:
step S110: initializing at least one controller of the gin framework and acquiring a memory address of the controller.
The whole conception of this application lies in: and when the project is started, controller information is acquired, and automatic registration routing is realized according to naming rules of the controller information, so that decoupling of a routing registration code and a service code is also realized.
The present application is executed by a registration server, which is communicatively connected to the gin frame, and is used for automatically registering the routing information of the gin frame.
The number of controllers in the gin frame may be one or more, and this application is not limited thereto, but in this embodiment, the number of controllers is described as one, and the case where there are a plurality of controllers corresponds to the case where there are one controller, and a plurality of controllers may be processed in parallel or in series, which is not limited thereto.
Firstly, initializing a controller of a gin framework and acquiring a memory address of the controller. Specifically, initializing at least one controller of the gin frame and acquiring a memory address of the controller includes: based on an init () method, calling a Register () method under a Router file, and initializing the controller; and acquiring the memory address of the self-structure body uploaded by the controller.
The Router is used for defining various routing rules and conditions and registering a specific route into a handler realized by context through HTTP service.
For one controller, each controller calls a Register () method of the Router file in an init () method and transmits the Register () method to a memory address of a self structure body to finish initialization of the controller.
The init () method is an initialization method that can be used to do some necessary initialization work before the start-up procedure, and is used for the initialization of the controller in the present application.
Step S120: based on a reflection mechanism, obtaining routing information contained in each controller according to the memory address, wherein the routing information comprises a controller name and at least one method information.
Reflective programming (in english: reflective programming) or reflection (in english: reflection) refers to the ability of a computer program to access, detect and modify its own state or behavior at runtime (runtime), and by metaphor, reflection is the ability of the program to "observe" and modify its own behavior at runtime. The reflection in the go language is also the effect, and the information of the type and the value of the variable can be acquired during the running of the program, then the variable is accessed or modified, and a reflection packet is built in the go language and is used for acquiring the type (type) and the value (value) of one variable, and the corresponding methods are respectively reflection. Type () and reflection. Value of ().
The application skillfully utilizes a reflection mechanism to acquire information contained in the controllers, specifically, the reflection mechanism is based on the memory address to acquire routing information contained in each controller, and the method comprises the following steps: based on a reflection mechanism, acquiring a controller name of the controller and at least one file name of the controller according to the memory address of the controller; constructing a corresponding service module for the controller according to the name of the controller; based on a reflection mechanism, acquiring method information of at least one method of the service module according to the file name, wherein the method information comprises a method name; and splicing the controller name and at least one method name to obtain the routing information.
After the memory address of the controller is obtained by adopting the Router Register method, the names of the controller and all file names contained in the controller are obtained based on a reflection mechanism. Further, according to the controller name, a corresponding service module is constructed for the controller, specifically, the controller name can be used as the service module name to construct the service module, and if the controller name is too long, a plurality of characters in front of the controller name can be obtained as the service module name in a character string interception mode. It should be noted that, the service module herein refers to service logic for registering a route for a gin framework. And then continuing to use the reflection mechanism, and taking all the obtained method information of the file name controller as the method information of the service module again according to the obtained method information, wherein one piece of method information at least comprises the method name of the method, and in an actual scene, the controller usually comprises a plurality of methods. And finally, splicing the controller name and at least one method name according to a certain format to obtain the routing information. In some embodiments of the present application, the method name may be converted to a small hump form name; and splicing the controller name and the small hump form name according to a preset sequence to obtain the routing information.
After the route information is obtained, the route information may be temporarily stored in a cache of the registration server or may be stored in a memory of the registration server, which is not limited in this application. In other embodiments of the present application, for ease of storage, the obtained routing information is stored in a certain data structure and in a slice containing all the routing information for subsequent use.
Step S130: and carrying out route registration on the route information so as to realize the route registration of the gin framework.
After the route information of all controllers is obtained, the controllers can be registered, and particularly, the engine of the gin web frame can be called to realize automatic registration of all routes. The Engine is used for initializing a gin object instance, and the object instance mainly comprises basic functions of some frameworks, such as logs, middleware setting, routing control (group), handler, context and other related methods. In the application, engine may be used to implement automatic registration of routes.
When the number of the route information slices is a plurality, the route registration is performed on the route information to realize the route registration of the gin frame, including: traversing each route information slice, and extracting a plurality of pieces of route information; invoking an engine of the gin web frame, and sequentially carrying out route registration on the extracted pieces of route information so as to realize the route registration of the gin web frame.
When the routing information is multiple, each piece of routing information can be registered in turn by adopting a traversing mechanism, one piece of routing information can be understood as a structure of a gin frame outside, one piece of routing information generally comprises one method or a plurality of methods, and after the routing information is processed in turn, the routing registration of the gin frame is realized.
After the route registration is completed, the registration server can transfer the control right of the gin frame to the gin frame, and the gin frame can process the external request based on the registered route information.
As can be seen from the method shown in fig. 1, the present application provides a method for registering a gin frame route, when starting based on gin items, initializing its controller, obtaining the memory address of the controller, then based on a reflection mechanism, obtaining information including a controller name, a method name and the like from the memory address of the controller, forming route information by these information, and finally automatically registering a route according to the route information, so as to complete the route registration of the gin frame. According to the method and the device, the controller information is acquired when the project based on the gin framework is started, automatic registration of the route is realized according to the naming rule, and compared with the current situation that each interface needs to be registered manually in the prior art, the efficiency of route registration is greatly improved, and the labor and time cost of route registration are remarkably saved; meanwhile, decoupling of the service code and the route registration code is realized, and when project development is carried out, developers only need to consider the service logic responsible for themselves, so that the collaborative development of multiple persons is more convenient, the conflict problem of version control tools and the like do not need to be considered, the development flow is standardized, and the development efficiency is improved.
Fig. 2 shows a routing registration method of gin frames according to another embodiment of the present application, and as can be seen from fig. 2, the present embodiment includes:
the entry of the project under the gin framework based on go language is anonymously introduced into the package where the controllers are located, wherein the number of controllers can be multiple.
Each controller invokes the Router's Register () method within the init () method and passes in its own memory address.
Based on the router.go file, the following steps are sequentially performed: acquiring the name of an incoming controller; acquiring all methods of an incoming controller; intercepting the name of the controller, converting the method name into a small hump form, splicing the name of the controller and the method name of the small hump form to obtain routing information, and storing the routing information in a slice; traversing each route slice, and calling the engin of the gin frame to sequentially register the route information; and confirming the completion of route registration, and communicating control rights back to the gin framework.
The gin framework can process the external request based on the registered route with the project successful start.
Fig. 3 shows a schematic structural diagram of a gin frame route registration device according to an embodiment of the present application, where the device may be deployed in a registration server, and as can be seen from fig. 3, a gin frame route registration device 300 includes:
an initializing unit 310, configured to initialize at least one controller of the gin frame and obtain a memory address of the controller;
an obtaining unit 320, configured to obtain, based on a reflection mechanism, routing information included in each of the controllers according to the memory address, where the routing information includes a controller name and at least one method information;
and a registration unit 330, configured to perform route registration on the route information, so as to implement route registration on the gin framework.
In some embodiments of the present application, in the foregoing apparatus, an initializing unit 310 is configured to invoke a Register () method under a Router file based on an init () method, and initialize the controller; and acquiring the memory address of the self-structure body uploaded by the controller.
In some embodiments of the present application, in the foregoing apparatus, the obtaining unit 320 is configured to obtain, based on a reflection mechanism, a controller name of the controller and at least one file name of the controller according to a memory address of the controller; constructing a corresponding service module for the controller according to the name of the controller; based on a reflection mechanism, acquiring method information of at least one method of the service module according to the file name, wherein the method information comprises a method name; and splicing the controller name and at least one method name to obtain the routing information.
In some embodiments of the present application, in the above apparatus, the obtaining unit 320 is configured to convert the method name into a small hump form name; and splicing the controller name and the small hump form name according to a first preset format to obtain the routing information.
In some embodiments of the present application, in the foregoing apparatus, the obtaining unit 320 is further configured to store the routing information in a routing information slice in a preset format before the step of performing route registration on the routing information.
In some embodiments of the present application, in the foregoing apparatus, the routing information is a plurality of pieces, and the number of the routing information slices is a plurality of pieces; a registration unit 330, configured to traverse each of the route information slices and extract a plurality of pieces of route information; invoking an engine of the gin web frame, and sequentially carrying out route registration on the extracted pieces of route information so as to realize the route registration of the gin web frame.
In some embodiments of the present application, the apparatus further comprises: and the transfer unit is used for transferring the control right of the gin frame to the gin frame after the step of carrying out route registration on the route information so as to realize the route registration on the gin frame, so that the gin frame processes the external request based on the registered route information.
It should be noted that, the above-mentioned routing registration device of gin frame can implement the foregoing routing registration method of gin frame one by one, and will not be described in detail here.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 4, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the route registration device of the gin framework on a logic level. And the processor is used for executing the program stored in the memory and particularly used for executing the method.
The method executed by the routing registration apparatus of gin framework disclosed in the embodiment shown in fig. 3 of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads configuration information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may further execute the method executed by the routing registration device of gin frame in fig. 3, and implement the function of the routing registration device of gin frame in the embodiment shown in fig. 3, which is not described herein again.
The embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform a method performed by a route registration apparatus of a gin framework in the embodiment shown in fig. 3, and specifically for performing the foregoing method.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both permanent and non-permanent, removable and non-removable media, may implement configuration information storage by any method or technology. The configuration information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store configuration information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other identical elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method of route registration for a gin framework, the method performed by a registration server, the method comprising:
initializing at least one controller of a gin frame and acquiring a memory address of the controller;
based on a reflection mechanism, acquiring routing information contained in each controller according to the memory address, wherein the routing information comprises a controller name and at least one method information;
and carrying out route registration on the route information so as to realize the route registration of the gin framework.
2. The method of claim 1, wherein initializing at least one controller of a gin frame and obtaining a memory address of the controller comprises:
based on an init () method, calling a Register () method under a Router file, and initializing the controller;
and acquiring the memory address of the self-structure body uploaded by the controller.
3. The method of claim 1, wherein the obtaining, based on the reflection mechanism and based on the memory address, routing information contained in each of the controllers includes:
based on a reflection mechanism, acquiring a controller name of the controller and at least one file name of the controller according to the memory address of the controller;
constructing a corresponding service module for the controller according to the name of the controller;
based on a reflection mechanism, acquiring method information of at least one method of the service module according to the file name, wherein the method information comprises a method name;
and splicing the controller name and at least one method name to obtain the routing information.
4. A method according to claim 3, wherein said concatenating the controller name and at least one method name to obtain the routing information comprises:
converting the method name into a small hump form name;
and splicing the controller name and the small hump form name according to a first preset format to obtain the routing information.
5. The method of claim 1, further comprising, prior to the step of route registering the routing information:
and storing the routing information in a preset format in a routing information slice.
6. The method of claim 4, wherein the routing information is a plurality of pieces and the number of routing information slices is a plurality;
the route registration of the route information to realize the route registration of the gin framework comprises the following steps: traversing each route information slice, and extracting a plurality of pieces of route information;
invoking an engine of the gin web frame, and sequentially carrying out route registration on the extracted pieces of route information so as to realize the route registration of the gin web frame.
7. The method of claim 1, wherein after the step of route registering the routing information to enable route registration of the gin frame, the method further comprises:
and transferring the control right of the gin frame to the gin frame so that the gin frame processes the external request based on the registered routing information.
8. A gin frame route registration device, characterized in that the device is capable of deploying a registration server for implementing the gin frame route registration method according to any one of claims 1 to 7.
9. A mobile robot, comprising:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any of claims 1 to 7.
10. A computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of any of claims 1-7.
CN202211647206.4A 2022-12-21 2022-12-21 Routing registration method and device of gin framework, electronic equipment and medium Pending CN116248571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211647206.4A CN116248571A (en) 2022-12-21 2022-12-21 Routing registration method and device of gin framework, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211647206.4A CN116248571A (en) 2022-12-21 2022-12-21 Routing registration method and device of gin framework, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN116248571A true CN116248571A (en) 2023-06-09

Family

ID=86626745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211647206.4A Pending CN116248571A (en) 2022-12-21 2022-12-21 Routing registration method and device of gin framework, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116248571A (en)

Similar Documents

Publication Publication Date Title
CN109002362B (en) Service method, device and system and electronic equipment
CN110704037B (en) Rule engine implementation method and device
CN111461887B (en) Block chain consensus processing method and device and electronic equipment
CN112671860B (en) Service access method, system, electronic device and medium for kubernets cluster
CN112698888A (en) Application modularization, component calling and component initialization method and device
CN110851207B (en) State transition management method and device, electronic equipment and storage medium
CN111813385B (en) Page plug-in method, device and equipment based on Web application
CN116248571A (en) Routing registration method and device of gin framework, electronic equipment and medium
CN114640657A (en) Multi-registration center fusion method and device
CN115794697A (en) Memory access method and device
CN112416612B (en) Service calling method and device, computer equipment and readable storage medium
CN111651469B (en) Method and device for managing blockchain system contracts
CN111045746A (en) Code expansion method and framework
CN110599139B (en) Block output method and device in block chain consensus algorithm
CN112130900B (en) User information management method, system, equipment and medium for BMC
CN111026502B (en) Business debugging architecture creating method and device, electronic equipment and storage medium
CN115150316A (en) Gateway control method, device, medium and gateway equipment based on dynamic routing
CN111796864A (en) Data verification method and device
CN115827120B (en) User state network stack calling and user state interface setting method and device
CN116820808A (en) Cross-system bridging realization method and cross-system function calling method
CN116074622B (en) Implementation method, device, equipment and medium for multi-protocol control USB camera
CN116820806A (en) Micro-service request processing method and device, electronic equipment and readable storage medium
CN115240663A (en) Hot word registration method, system, medium, device and vehicle
CN117950745A (en) Micro front end-based sub-application registration method, device, equipment and storage medium
CN116909970A (en) Method and device for debugging serial port redirection, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination