-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from yandex/arcadia
Arcadia to master
- Loading branch information
Showing
140 changed files
with
2,681 additions
and
624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
language: go | ||
|
||
go: | ||
- 1.11.x | ||
- 1.15.x | ||
|
||
env: | ||
- GO111MODULE=on | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) 2017 Yandex LLC. All rights reserved. | ||
// Use of this source code is governed by a MPL 2.0 | ||
// license that can be found in the LICENSE file. | ||
// Author: Vladimir Skipor <[email protected]> | ||
|
||
package ammo | ||
|
||
type Ammo struct { | ||
Tag string `json:"tag"` | ||
Call string `json:"call"` | ||
Metadata map[string]string `json:"metadata"` | ||
Payload map[string]interface{} `json:"payload"` | ||
id int | ||
isInvalid bool | ||
} | ||
|
||
func (a *Ammo) Reset(tag string, call string, metadata map[string]string, payload map[string]interface{}) { | ||
*a = Ammo{tag, call, metadata, payload, -1, false} | ||
} | ||
|
||
func (a *Ammo) SetID(id int) { | ||
a.id = id | ||
} | ||
|
||
func (a *Ammo) ID() int { | ||
return a.id | ||
} | ||
|
||
func (a *Ammo) Invalidate() { | ||
a.isInvalid = true | ||
} | ||
|
||
func (a *Ammo) IsInvalid() bool { | ||
return a.isInvalid | ||
} | ||
|
||
func (a *Ammo) IsValid() bool { | ||
return !a.isInvalid | ||
} |
Oops, something went wrong.