This commit is contained in:
hoteas 2018-04-03 17:54:27 +00:00
parent 6ecdd575aa
commit 1de2c6e8b6
14 changed files with 405 additions and 385 deletions

View File

@ -5,6 +5,5 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="GOPATH &lt;hotime&gt;" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Go SDK" level="project" />
</component>
</module>

View File

@ -1,8 +0,0 @@
<component name="libraryTable">
<library name="Go SDK">
<CLASSES>
<root url="file://D:/app/go/src" />
</CLASSES>
<SOURCES />
</library>
</component>

View File

@ -4,8 +4,20 @@
<bookmark url="file://$PROJECT_DIR$/var.go" line="12" />
</component>
<component name="ChangeListManager">
<list default="true" readonly="true" id="03ed5703-81a1-441b-849c-c426276586b7" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<list default="true" readonly="true" id="03ed5703-81a1-441b-849c-c426276586b7" name="Default" comment="工具">
<change beforePath="$PROJECT_DIR$/.idea/hotime.iml" afterPath="$PROJECT_DIR$/.idea/hotime.iml" />
<change beforePath="$PROJECT_DIR$/.idea/libraries" afterPath="" />
<change beforePath="$PROJECT_DIR$/.idea/libraries/Go_SDK.xml" afterPath="" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/application.go" afterPath="$PROJECT_DIR$/application.go" />
<change beforePath="$PROJECT_DIR$/cache_memory.go" afterPath="$PROJECT_DIR$/cache_memory.go" />
<change beforePath="$PROJECT_DIR$/const.go" afterPath="$PROJECT_DIR$/const.go" />
<change beforePath="$PROJECT_DIR$/error.go" afterPath="$PROJECT_DIR$/error.go" />
<change beforePath="$PROJECT_DIR$/example/config/config.json" afterPath="$PROJECT_DIR$/example/config/config.json" />
<change beforePath="$PROJECT_DIR$/example/main.go" afterPath="$PROJECT_DIR$/example/main.go" />
<change beforePath="$PROJECT_DIR$/func.go" afterPath="$PROJECT_DIR$/func.go" />
<change beforePath="$PROJECT_DIR$/map.go" afterPath="$PROJECT_DIR$/map.go" />
<change beforePath="$PROJECT_DIR$/session.go" afterPath="$PROJECT_DIR$/session.go" />
</list>
<ignored path=".idea/dataSources.local.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -23,112 +35,26 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="map.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/map.go">
<file leaf-file-name="main.go" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="748">
<caret line="49" column="0" lean-forward="false" selection-start-line="49" selection-start-column="0" selection-end-line="58" selection-end-column="1" />
<folding>
<element signature="e#16#72#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="func.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/func.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="21" column="5" lean-forward="false" selection-start-line="21" selection-start-column="5" selection-end-line="21" selection-end-column="5" />
<state relative-caret-position="180">
<caret line="18" column="12" lean-forward="false" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="manage.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/manage/manage.go">
<file leaf-file-name="cache_memory.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cache_memory.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<caret line="39" column="9" lean-forward="false" selection-start-line="39" selection-start-column="9" selection-end-line="39" selection-end-column="9" />
<state relative-caret-position="150">
<caret line="13" column="0" lean-forward="true" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ddsms.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dri/ddsms/ddsms.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1292">
<caret line="83" column="22" lean-forward="false" selection-start-line="83" selection-start-column="22" selection-end-line="83" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="upload.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dri/upload/upload.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<caret line="30" column="5" lean-forward="false" selection-start-line="30" selection-start-column="5" selection-end-line="30" selection-end-column="5" />
<folding>
<element signature="e#16#121#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.html" pinned="false" current-in-tab="true">
<entry file="file://E:/work/hotimejs/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="23" column="7" lean-forward="true" selection-start-line="23" selection-start-column="7" selection-end-line="23" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="config.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/config/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="17" column="1" lean-forward="false" selection-start-line="17" selection-start-column="1" selection-end-line="17" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="objtoobj.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/objtoobj.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2686">
<caret line="163" column="20" lean-forward="false" selection-start-line="163" selection-start-column="20" selection-end-line="163" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="session.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/session.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="969">
<caret line="57" column="13" lean-forward="false" selection-start-line="57" selection-start-column="13" selection-end-line="57" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="slice.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/slice.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="493">
<caret line="32" column="42" lean-forward="false" selection-start-line="32" selection-start-column="42" selection-end-line="32" selection-end-column="42" />
<folding>
<element signature="e#16#53#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
@ -145,12 +71,20 @@
<find>Ping</find>
<find>SESSION_TYPE</find>
<find>GetString</find>
<find>CacheMemory</find>
<find>GetTag</find>
</findStrings>
<replaceStrings>
<replace>MUTEX_SESSION_TYPE</replace>
<replace>GetTag</replace>
<replace>CacheRedis</replace>
</replaceStrings>
</component>
<component name="GradleLocalSettings">
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
@ -162,29 +96,32 @@
<option value="$PROJECT_DIR$/cachememory.go" />
<option value="$PROJECT_DIR$/memorycache.go" />
<option value="$PROJECT_DIR$/dbcache.go" />
<option value="$PROJECT_DIR$/type.go" />
<option value="$PROJECT_DIR$/app.go" />
<option value="$PROJECT_DIR$/var.go" />
<option value="$PROJECT_DIR$/example/tpt/index.html" />
<option value="$PROJECT_DIR$/base.go" />
<option value="$PROJECT_DIR$/base_context.go" />
<option value="$PROJECT_DIR$/func.go" />
<option value="$PROJECT_DIR$/context_base.go" />
<option value="$PROJECT_DIR$/obj.go" />
<option value="$PROJECT_DIR$/application.go" />
<option value="$PROJECT_DIR$/cache_db.go" />
<option value="$PROJECT_DIR$/cache_memory.go" />
<option value="$PROJECT_DIR$/context.go" />
<option value="$PROJECT_DIR$/config/config.json" />
<option value="$PROJECT_DIR$/db.go" />
<option value="$PROJECT_DIR$/manage/manage.go" />
<option value="$PROJECT_DIR$/error.go" />
<option value="$PROJECT_DIR$/const.go" />
<option value="$PROJECT_DIR$/session.go" />
<option value="$PROJECT_DIR$/example/main.go" />
<option value="$PROJECT_DIR$/map.go" />
<option value="$PROJECT_DIR$/slice.go" />
<option value="$PROJECT_DIR$/dri/upload/upload.go" />
<option value="$PROJECT_DIR$/cache_groupcache.go" />
<option value="$PROJECT_DIR$/application.go" />
<option value="$PROJECT_DIR$/type.go" />
<option value="$PROJECT_DIR$/session.go" />
<option value="$PROJECT_DIR$/example/tpt/index.html" />
<option value="$PROJECT_DIR$/example/config/config.json" />
<option value="$PROJECT_DIR$/map.go" />
<option value="$PROJECT_DIR$/const.go" />
<option value="$PROJECT_DIR$/func.go" />
<option value="$PROJECT_DIR$/error.go" />
<option value="$PROJECT_DIR$/cache_redis.go" />
<option value="$PROJECT_DIR$/cache_memory.go" />
<option value="$PROJECT_DIR$/example/main.go" />
</list>
</option>
</component>
@ -220,23 +157,42 @@
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="hotime" type="b2602c69:ProjectViewProjectNode" />
<item name="hotime" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="hotime" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="hotime" type="b2602c69:ProjectViewProjectNode" />
<item name="hotime" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="hotime" type="b2602c69:ProjectViewProjectNode" />
<item name="hotime" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
<item name="config" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="hotime" type="b2602c69:ProjectViewProjectNode" />
<item name="hotime" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
<item name="tpt" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="AndroidView" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="last_opened_file_path" value="E:/work/hotimejs/index.html" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="configurable.Global.GOPATH.is.expanded" value="true" />
<property name="configurable.Project.GOPATH.is.expanded" value="true" />
@ -266,7 +222,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Go Application.Build main.go and run">
<component name="RunManager">
<configuration name="Build main.go and run" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true">
<module name="hotime" />
<working_directory value="$PROJECT_DIR$/" />
@ -291,14 +247,6 @@
<kind value="DIRECTORY" />
<package value="hoteas/hotime" />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
</configuration>
<configuration default="true" type="CodeceptionConfigurationType" factoryName="Codeception">
<PhpTestRunnerSettings />
<method />
@ -363,9 +311,17 @@
<recursive>false</recursive>
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
</configuration>
<recent_temporary>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="Go Application.Build main.go and run" />
<item index="0" class="java.lang.String" itemvalue="Go Build.Build main.go and run" />
</list>
</recent_temporary>
</component>
@ -373,23 +329,23 @@
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration" cleanupOnStartRun="true">
<configuration>C:\Users\\AppData\Roaming\Subversion</configuration>
<configuration>C:\Users\92597\AppData\Roaming\Subversion</configuration>
<supportedVersion>125</supportedVersion>
</component>
<component name="SvnFileUrlMappingImpl">
<option name="myMappingRoots">
<list>
<SvnCopyRootSimple>
<option name="myVcsRoot" value="E:\gopath1\trunk\src\go.hoteas.com\hotime" />
<option name="myCopyRoot" value="E:\gopath1\trunk\src\go.hoteas.com\hotime" />
<option name="myVcsRoot" value="D:\golang\path\trunk\src\go.hoteas.com\hotime" />
<option name="myCopyRoot" value="D:\golang\path\trunk\src\go.hoteas.com\hotime" />
</SvnCopyRootSimple>
</list>
</option>
<option name="myMoreRealMappingRoots">
<list>
<SvnCopyRootSimple>
<option name="myVcsRoot" value="E:\gopath1\trunk\src\go.hoteas.com\hotime" />
<option name="myCopyRoot" value="E:\gopath1\trunk\src\go.hoteas.com\hotime" />
<option name="myVcsRoot" value="D:\golang\path\trunk\src\go.hoteas.com\hotime" />
<option name="myCopyRoot" value="D:\golang\path\trunk\src\go.hoteas.com\hotime" />
</SvnCopyRootSimple>
</list>
</option>
@ -430,6 +386,8 @@
<workItem from="1504575702799" duration="11303000" />
<workItem from="1504661068799" duration="698000" />
<workItem from="1508808650888" duration="210000" />
<workItem from="1522689261517" duration="951000" />
<workItem from="1522771122447" duration="2480000" />
</task>
<task id="LOCAL-00001">
<created>1500458878821</created>
@ -624,7 +582,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="89749000" />
<option name="totallyTimeSpent" value="93180000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -639,27 +597,34 @@
<frame x="55" y="-8" width="1873" height="1084" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.34528404" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32846716" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32911393" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912722" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.6330179" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24972437" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32911393" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.6329114" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32846716" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.35300606" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24972437" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3997923" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Debug Logs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Execute Anonymous" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Salesforce" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -682,35 +647,6 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/objtoobj.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-289">
<caret line="97" column="5" lean-forward="false" selection-start-line="97" selection-start-column="5" selection-end-line="97" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/var.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="23" column="46" lean-forward="false" selection-start-line="23" selection-start-column="46" selection-end-line="23" selection-end-column="46" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/func.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="595">
<caret line="38" column="12" lean-forward="false" selection-start-line="38" selection-start-column="12" selection-end-line="38" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/map.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="23" column="1" lean-forward="false" selection-start-line="23" selection-start-column="1" selection-end-line="23" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
@ -758,13 +694,6 @@
<entry file="file://$PROJECT_DIR$/memorycache.go" />
<entry file="file://$PROJECT_DIR$/dbcache.go" />
<entry file="file://$PROJECT_DIR$/app.go" />
<entry file="file://$PROJECT_DIR$/example/tpt/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="16" lean-forward="false" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://D:/app/go/src/database/sql/sql.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="6">
@ -779,13 +708,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="16" column="15" lean-forward="false" selection-start-line="16" selection-start-column="15" selection-end-line="16" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/context.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
@ -800,13 +722,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="5389">
<caret line="324" column="0" lean-forward="false" selection-start-line="324" selection-start-column="0" selection-end-line="324" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://D:/app/go/src/errors/errors.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -870,49 +785,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/type.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/error.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="11" column="19" lean-forward="false" selection-start-line="11" selection-start-column="19" selection-end-line="11" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/var.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="18" column="24" lean-forward="false" selection-start-line="18" selection-start-column="24" selection-end-line="18" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/const.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="9" column="13" lean-forward="false" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cache_memory.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="816">
<caret line="92" column="1" lean-forward="false" selection-start-line="92" selection-start-column="1" selection-end-line="92" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cache_db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-289">
<caret line="10" column="15" lean-forward="false" selection-start-line="10" selection-start-column="15" selection-end-line="10" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://D:/app/go/src/internal/poll/fd_mutex.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272">
@ -920,111 +792,210 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1210">
<caret line="85" column="0" lean-forward="false" selection-start-line="85" selection-start-column="0" selection-end-line="85" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/context_base.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="9" column="0" lean-forward="false" selection-start-line="9" selection-start-column="0" selection-end-line="16" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/obj.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="15" lean-forward="false" selection-start-line="5" selection-start-column="15" selection-end-line="5" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/objtoobj.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2686">
<caret line="163" column="20" lean-forward="false" selection-start-line="163" selection-start-column="20" selection-end-line="163" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/session.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="969">
<caret line="57" column="13" lean-forward="false" selection-start-line="57" selection-start-column="13" selection-end-line="57" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/slice.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="493">
<caret line="32" column="42" lean-forward="false" selection-start-line="32" selection-start-column="42" selection-end-line="32" selection-end-column="42" />
<folding>
<element signature="e#16#53#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/map.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="748">
<caret line="49" column="0" lean-forward="false" selection-start-line="49" selection-start-column="0" selection-end-line="58" selection-end-column="1" />
<folding>
<element signature="e#16#72#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/func.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="21" column="5" lean-forward="false" selection-start-line="21" selection-start-column="5" selection-end-line="21" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/manage/manage.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<state relative-caret-position="450">
<caret line="39" column="9" lean-forward="false" selection-start-line="39" selection-start-column="9" selection-end-line="39" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/config.json" />
<entry file="file://$PROJECT_DIR$/example/config/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="17" column="1" lean-forward="false" selection-start-line="17" selection-start-column="1" selection-end-line="17" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dri/ddsms/ddsms.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1292">
<caret line="83" column="22" lean-forward="false" selection-start-line="83" selection-start-column="22" selection-end-line="83" selection-end-column="22" />
<state relative-caret-position="1140">
<caret line="83" column="19" lean-forward="false" selection-start-line="83" selection-start-column="19" selection-end-line="83" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dri/upload/upload.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<state relative-caret-position="315">
<caret line="30" column="5" lean-forward="false" selection-start-line="30" selection-start-column="5" selection-end-line="30" selection-end-column="5" />
<folding>
<element signature="e#16#121#0" expanded="true" />
<element signature="e#16#121#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://E:/work/hotimejs/index.html">
<entry file="file://E:/work/hotimejs/index.html" />
<entry file="file://$PROJECT_DIR$/../../github.com/golang/groupcache/groupcache.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="23" column="7" lean-forward="true" selection-start-line="23" selection-start-column="7" selection-end-line="23" selection-end-column="7" />
<state relative-caret-position="540">
<caret line="46" column="48" lean-forward="false" selection-start-line="46" selection-start-column="48" selection-end-line="46" selection-end-column="48" />
<folding />
</state>
</provider>
</entry>
<entry file="file://D:/app/go/src/builtin/builtin.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3810">
<caret line="254" column="5" lean-forward="false" selection-start-line="254" selection-start-column="5" selection-end-line="254" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cache_db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-661">
<caret line="10" column="15" lean-forward="false" selection-start-line="10" selection-start-column="15" selection-end-line="10" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="329">
<caret line="38" column="4" lean-forward="false" selection-start-line="38" selection-start-column="4" selection-end-line="38" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/var.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="9" lean-forward="false" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/objtoobj.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="892">
<caret line="163" column="20" lean-forward="false" selection-start-line="163" selection-start-column="20" selection-end-line="163" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/obj.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="15" lean-forward="false" selection-start-line="5" selection-start-column="15" selection-end-line="5" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mime.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/context_base.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="0" lean-forward="false" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/tpt/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="7" lean-forward="false" selection-start-line="9" selection-start-column="7" selection-end-line="9" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/config/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="1" lean-forward="true" selection-start-line="17" selection-start-column="1" selection-end-line="17" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1930">
<caret line="324" column="0" lean-forward="false" selection-start-line="324" selection-start-column="0" selection-end-line="324" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/slice.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-299">
<caret line="32" column="12" lean-forward="false" selection-start-line="32" selection-start-column="12" selection-end-line="32" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/type.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="20" lean-forward="false" selection-start-line="11" selection-start-column="20" selection-end-line="11" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/session.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="406">
<caret line="65" column="1" lean-forward="false" selection-start-line="65" selection-start-column="1" selection-end-line="65" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/map.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="47" column="0" lean-forward="false" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" />
<folding>
<element signature="e#16#64#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/const.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="15" column="25" lean-forward="false" selection-start-line="15" selection-start-column="25" selection-end-line="15" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/func.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="18" column="34" lean-forward="true" selection-start-line="18" selection-start-column="22" selection-end-line="18" selection-end-column="34" />
<folding>
<element signature="e#16#75#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/error.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="9" lean-forward="false" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cache_redis.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="166">
<caret line="39" column="29" lean-forward="true" selection-start-line="39" selection-start-column="29" selection-end-line="39" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cache_memory.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="13" column="0" lean-forward="true" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="18" column="12" lean-forward="false" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
<folding />
</state>
</provider>

View File

@ -35,6 +35,10 @@ func (this *Application) ServeHTTP(w http.ResponseWriter, req *http.Request) {
//启动实例
func (this *Application) Run(router Router) {
this.Router = router
//this.Port = port
this.Port = this.Config.GetString("port")
@ -175,9 +179,9 @@ func (this *Application) SetConnectListener(lis func(this *Context) bool) {
}
//网络错误
func (this *Application) session(w http.ResponseWriter, req *http.Request) {
}
//func (this *Application) session(w http.ResponseWriter, req *http.Request) {
//
//}
//序列化链接
func (this *Application) urlSer(url string) (string, []string) {

View File

@ -2,12 +2,14 @@ package hotime
import (
"time"
"sync"
)
type CacheMemory struct {
Time int64
Map
contextBase
mutex *sync.RWMutex
}
//获取Cache键只能为string类型
@ -56,7 +58,13 @@ func (this *CacheMemory) delete(key string) {
func (this *CacheMemory) Cache(key string, data ...interface{}) *Obj {
return SafeMutex(MUTEX_MEMORY_CACHE, func() interface{} {
if this.mutex==nil{
this.mutex=&sync.RWMutex{}
}
this.mutex.Lock()
defer this.mutex.Unlock()
if len(data) == 0 {
return &Obj{Data: this.get(key)}
@ -88,6 +96,5 @@ func (this *CacheMemory) Cache(key string, data ...interface{}) *Obj {
this.set(key, data[0], tim)
return &Obj{Data: nil}
}).(*Obj)
}

61
cache_redis.go Normal file
View File

@ -0,0 +1,61 @@
package hotime
import (
"time"
)
type CacheRedis struct {
Time int64
Map
contextBase
}
//获取Cache键只能为string类型
func (this *CacheRedis) get(key string) interface{} {
this.Error.SetError(nil)
if this.Map[key] == nil {
return nil
}
data := this.Map.Get(key, &this.Error).(cacheData)
if this.GetError() != nil {
return nil
}
//data:=cacheMap[key];
if data.time <= time.Now().Unix() {
delete(this.Map, key)
return nil
}
return data.data
}
//key value ,时间为时间戳
func (this *CacheRedis) set(key string, value interface{}, time int64) {
this.Error.SetError(nil)
var data cacheData
dd := this.Map.Get(key, &this.Error)
if dd == nil {
data = cacheData{}
} else {
data = dd.(cacheData)
}
data.time = time
data.data = value
if this.Map == nil {
this.Map = Map{}
}
this.Map.Put(key, data)
}
func (this *CacheRedis) delete(key string) {
delete(this.Map, key)
}
//func (this *CacheRedis) Cache(key string, data ...interface{}) *Obj {
//
//
//
//}

View File

@ -5,16 +5,5 @@ const (
LOG_NIL = 1
LOG_FILE=2
)
//锁关键字
const (
MUTEX_MAP = "HOTIME-MAP"
MUTEX_SLICE = "HOTIME-SLICE"
MUTEX_MEMORY_CACHE = "HOTIME-MUTEX-MEMORYCACHE"
MUTEX_HOTIME_SYSTEM_ERR="HOTIME-SYSTEM-ERR"
)
//锁关键字
const (
MUTEX_SESSION_TYPE = "SESSION-TYPE#"
)
//session储存头
const HEAD_SESSION_ADD ="session#"

View File

@ -1,6 +1,8 @@
package hotime
import "fmt"
import (
"fmt"
)
//框架层处理错误
type Error struct {
@ -15,11 +17,11 @@ func(this *Error)GetError()error{
func(this *Error)SetError(err error,loglevel ...int){
SafeMutex(MUTEX_HOTIME_SYSTEM_ERR, func() interface{} {
this.err=nil
if err==nil{
this.err=err
return nil
return
}
lev:=Config.GetInt("LOG_NIL")
@ -35,8 +37,5 @@ func(this *Error)SetError(err error,loglevel ...int){
fmt.Println(err)
}
this.err=err
return nil
})
return
}

View File

@ -14,5 +14,5 @@
"logLevel": 0,
"port": "80",
"sessionName": "HOTIME",
"tpt": "tpt"
"tpt": "example/tpt"
}

View File

@ -10,6 +10,21 @@ import (
func main() {
x:=hotime.CacheMemory{}
x.Cache("x",123)
for i:=0;i<10000000 ;i++ {
go func() {
x.Cache("y",i)
fmt.Println(x.Cache("y"))
fmt.Println(x.Cache("y",nil))
}()
}
appIns := hotime.Application{}
i := 0
@ -21,7 +36,7 @@ func main() {
})
//手动模式,
appIns.SetConfig()
appIns.SetConfig("example/config/config.json")
appIns.SetConnectDB(func(err ...*hotime.Error) *sql.DB {
query := appIns.Config.GetString("dbUser") + ":" + appIns.Config.GetString("dbPwd") +
"@tcp(" + appIns.Config.GetString("dbHost") + ":" + appIns.Config.GetString("dbPort") + ")/" + appIns.Config.GetString("dbName") + "?charset=utf8"

33
func.go
View File

@ -5,25 +5,28 @@ import (
"encoding/hex"
"math"
"strings"
"sync"
)
//安全锁
func SafeMutex(tag string, f func() interface{}) interface{} {
//func SafeMutex(tag int, f func() interface{}) interface{} {
//
// mutexer.Lock()
// if mutex[tag] == nil {
//
// mutex[tag] = &sync.RWMutex{}
//
// }
// mutexer.Unlock()
//
// mutex[tag].Lock()
// res := f()
// mutex[tag].Unlock()
// return res
//}
mutexer.Lock()
if mutex[tag] == nil {
mutex[tag] = &sync.RWMutex{}
}
mutexer.Unlock()
mutex[tag].Lock()
res := f()
mutex[tag].Unlock()
return res
}
//字符串首字符大写
func StrFirstToUpper(str string) string {

12
map.go
View File

@ -4,7 +4,6 @@ import (
"encoding/json"
"errors"
"reflect"
"time"
)
//hotime的常用map
@ -48,17 +47,6 @@ func (this Map) GetInt(key string, err ...*Error) int {
}
// //唯一标志
func (this Map) GetTag() int64 {
res := this.GetInt64(MUTEX_MAP)
if res == int64(0) {
res = time.Now().UnixNano()
this.Put(MUTEX_MAP, res)
}
return res
}
//获取Int
func (this Map) GetInt64(key string, err ...*Error) int64 {
v := ObjToInt64((this)[key], err...)

View File

@ -12,10 +12,10 @@ type SessionIns struct {
func (this *SessionIns) set() {
if this.ShortCache != nil {
this.ShortCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
this.ShortCache.Cache(this.SessionId, this.Map)
}
if this.LongCache != nil {
this.LongCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
this.LongCache.Cache(this.SessionId, this.Map)
}
}
@ -44,23 +44,23 @@ func (this *SessionIns) Session(key string, data ...interface{}) *Obj {
func (this *SessionIns) get() {
if this.ShortCache != nil {
this.Map = this.ShortCache.Cache(MUTEX_SESSION_TYPE + this.SessionId).ToMap()
this.Map = this.ShortCache.Cache(HEAD_SESSION_ADD + this.SessionId).ToMap()
if this.Map != nil {
return
}
}
if this.LongCache != nil {
this.Map = this.LongCache.Cache(MUTEX_SESSION_TYPE + this.SessionId).ToMap()
this.Map = this.LongCache.Cache(HEAD_SESSION_ADD + this.SessionId).ToMap()
if this.Map != nil {
if this.ShortCache != nil {
this.ShortCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
this.ShortCache.Cache(HEAD_SESSION_ADD+this.SessionId, this.Map)
}
return
}
}
this.Map = Map{}
this.ShortCache.Cache(MUTEX_SESSION_TYPE+this.SessionId, this.Map)
this.ShortCache.Cache(HEAD_SESSION_ADD+this.SessionId, this.Map)
return
}

8
var.go
View File

@ -1,14 +1,6 @@
package hotime
import "sync"
//var Config = struct {
// LogLevel int
//}{
// LogLevel: LOG_FMT, //日志等级处理LogFmt显示所有错误到控制台LogNil不记录任何错误
//}
var mutex = map[interface{}]*sync.RWMutex{} //安全锁
var mutexer = sync.RWMutex{} //读写锁
var IsRun = false //当前状态
var App = map[string]*Application{} //整个项目