forked from golang/hotime
工具
This commit is contained in:
parent
910424f80c
commit
c3d0b64d72
@ -5,6 +5,7 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" readonly="true" id="03ed5703-81a1-441b-849c-c426276586b7" name="Default" comment="工具">
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/cache" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change beforePath="$PROJECT_DIR$/cache_memory.go" afterPath="$PROJECT_DIR$/cache_memory.go" />
|
||||
<change beforePath="$PROJECT_DIR$/cache_redis.go" afterPath="$PROJECT_DIR$/cache_redis.go" />
|
||||
@ -27,11 +28,11 @@
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="main.go" pinned="false" current-in-tab="false">
|
||||
<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="390">
|
||||
<caret line="32" column="6" lean-forward="true" selection-start-line="32" selection-start-column="6" selection-end-line="32" selection-end-column="6" />
|
||||
<state relative-caret-position="375">
|
||||
<caret line="32" column="17" lean-forward="true" selection-start-line="32" selection-start-column="17" selection-end-line="32" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -57,11 +58,11 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="cache_redis.go" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="cache_redis.go" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/cache_redis.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="9" column="4" lean-forward="false" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="7" />
|
||||
<caret line="10" column="14" lean-forward="true" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -132,8 +133,8 @@
|
||||
<option value="$PROJECT_DIR$/error.go" />
|
||||
<option value="$PROJECT_DIR$/cache_memory.go" />
|
||||
<option value="$PROJECT_DIR$/example/config/config.json" />
|
||||
<option value="$PROJECT_DIR$/example/main.go" />
|
||||
<option value="$PROJECT_DIR$/cache_redis.go" />
|
||||
<option value="$PROJECT_DIR$/example/main.go" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -177,23 +178,6 @@
|
||||
<item name="hotime" type="b2602c69:ProjectViewProjectNode" />
|
||||
<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>
|
||||
@ -402,7 +386,7 @@
|
||||
<workItem from="1522771122447" duration="2480000" />
|
||||
<workItem from="1522778115746" duration="44000" />
|
||||
<workItem from="1522778659126" duration="455000" />
|
||||
<workItem from="1522779789231" duration="1365000" />
|
||||
<workItem from="1522779789231" duration="1641000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001">
|
||||
<created>1500458878821</created>
|
||||
@ -597,7 +581,7 @@
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="95044000" />
|
||||
<option name="totallyTimeSpent" value="95320000" />
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
<todo-panel id="selected-file">
|
||||
@ -610,6 +594,7 @@
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="55" y="-8" width="1873" height="1084" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<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="Palette	" 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" />
|
||||
@ -619,7 +604,7 @@
|
||||
<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="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="Run" 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="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32805908" 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="true" show_stripe_button="true" weight="0.32805908" 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.36900166" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
@ -701,14 +686,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/main.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="390">
|
||||
<caret line="32" column="6" lean-forward="true" selection-start-line="32" selection-start-column="6" selection-end-line="32" selection-end-column="6" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/cache_memory.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="133">
|
||||
@ -720,7 +697,15 @@
|
||||
<entry file="file://$PROJECT_DIR$/cache_redis.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="9" column="4" lean-forward="false" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="7" />
|
||||
<caret line="10" column="14" lean-forward="true" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/example/main.go">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="375">
|
||||
<caret line="32" column="17" lean-forward="true" selection-start-line="32" selection-start-column="17" selection-end-line="32" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -3,17 +3,18 @@ package hotime
|
||||
import (
|
||||
"time"
|
||||
"sync"
|
||||
"github.com/garyburd/redigo/redis"
|
||||
)
|
||||
|
||||
type CacheRedis struct {
|
||||
Time int64
|
||||
Map
|
||||
redis.Conn
|
||||
contextBase
|
||||
}
|
||||
|
||||
func (this *CacheRedis) Cache(key string, data ...interface{}) *Obj {
|
||||
|
||||
|
||||
redis.Dial()
|
||||
|
||||
reData:= &Obj{}
|
||||
|
||||
|
@ -6,10 +6,11 @@ import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"go.hoteas.com/hotime"
|
||||
"golang.org/x/net/websocket"
|
||||
"github.com/garyburd/redigo/redis"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
hotime.CacheRedis{nil,redis.Dial()}
|
||||
appIns := hotime.Application{}
|
||||
i := 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user