Documentation ¶
Index ¶
- Constants
- Variables
- func GeneratePoliciesFromDiscoverRequests(requests []*ads.RequestContext, ...) (map[string]*pms.Service, error)
- func GetAllStoreParams() map[string]string
- func NewStore(storeType string, storeConfig map[string]interface{}) (pms.PolicyStoreManager, error)
- func Register(storeType string, storeBuilder StoreBuilder)
- func StoreBuilders() []string
- type DiscoverRequestManager
- type StoreBuilder
Constants ¶
Variables ¶
View Source
var MaxDiscoverRequestNum, DeleteNumWhenReachMaxDiscoverRequest int64
Functions ¶
func GeneratePoliciesFromDiscoverRequests ¶
func GetAllStoreParams ¶
The return map expect param's command line flag name as key, and storeProps key in config file as value
func NewStore ¶
func NewStore(storeType string, storeConfig map[string]interface{}) (pms.PolicyStoreManager, error)
func Register ¶
func Register(storeType string, storeBuilder StoreBuilder)
Register makes a type of store available by the provided name. If Register is called twice with the same name or if storeBuilder is nil, it panics.
Types ¶
type DiscoverRequestManager ¶
type DiscoverRequestManager interface { //Save discover request SaveDiscoverRequest(discoverRequest *ads.RequestContext) error //Get last request log GetLastDiscoverRequest(serviceName string) (*ads.RequestContext, int64, error) //Get request logs since a revision. GetDiscoverRequestsSinceRevision(serviceName string, revision int64) ([]*ads.RequestContext, int64, error) //Get request logs for a service. Get all requests when serviceName is empty. GetDiscoverRequests(serviceName string) ([]*ads.RequestContext, int64, error) //Clean request logs for a service. Clean all request logs when serviceName is empty. ResetDiscoverRequests(serviceName string) error //Generate policies for principal based on existing request logs. Generate policies for all principals when principalXXX are empty. GeneratePolicies(serviceName, principalType, principalName, principalIDD string) (map[string]*pms.Service, int64, error) }
Click to show internal directories.
Click to hide internal directories.