github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/infura/types/interface.go (about) 1 package types 2 3 // *********************************** 4 type IStreamEngine interface { 5 Write(data IStreamData) bool 6 } 7 8 type IStreamData interface { 9 ConvertEngineData() EngineData 10 } 11 12 // Distributed State Service Interface 13 type IDistributeStateService interface { 14 GetLockerID() string 15 GetDistState(stateKey string) string 16 SetDistState(stateKey string, stateValue string) error 17 FetchDistLock(lockKey string, locker string, expiredInMS int) (bool, error) 18 ReleaseDistLock(lockKey string, locker string) (bool, error) 19 UnlockDistLockWithState(lockKey string, locker string, stateKey string, stateValue string) (bool, error) 20 }