func GetIndexSet(cl *client.Client, server *mockserver.Server, prefix string) (*graylog.IndexSet, func(string), error) {
	iss, _, _, _, err := cl.GetIndexSets(0, 0, false)
	if err != nil {
		return nil, nil, err
	}
	if len(iss) != 0 {
		return &(iss[0]), nil, nil
	}
	is := IndexSet(prefix)
	if _, err := cl.CreateIndexSet(is); err != nil {
		return nil, nil, err
	}
	WaitAfterCreateIndexSet(server)
	return is, func(id string) {
		if _, err := cl.DeleteIndexSet(id); err == nil {
			WaitAfterDeleteIndexSet(server)
		}
	}, nil
}
// GetIndexSet returns an IndexSet.
GetIndexSet returns an IndexSet.
// GetIndexSet returns an IndexSet .
func GetIndexSet(cl *client.Client, server *mockserver.Server, prefix string) (*graylog.IndexSet, func(string), error) {
	iss, _, _, _, err := cl.GetIndexSets(0, 0, false)
	if err != nil {
		return nil, nil, err
	}
	if len(iss) != 0 {
		return &(iss[0]), nil, nil
	}
	is := IndexSet(prefix)
	if _, err := cl.CreateIndexSet(is); err != nil {
		return nil, nil, err
	}
	WaitAfterCreateIndexSet(server)
	return is, func(id string) {
		if _, err := cl.DeleteIndexSet(id); err == nil {
			WaitAfterDeleteIndexSet(server)
		}
	}, nil
}
func GetIndexSet ( cl * client . Client , server * mockserver . Server , prefix string ) ( * graylog . IndexSet , func ( string ) , error ) { iss , _ , _ , _ , err := cl . GetIndexSets ( 0 , 0 , false ) if err != nil { return nil , nil , err } if len ( iss ) != 0 { return & ( iss [ 0 ] ) , nil , nil } is := IndexSet ( prefix ) if _ , err := cl . CreateIndexSet ( is ) ; err != nil { return nil , nil , err } WaitAfterCreateIndexSet ( server ) return is , func ( id string ) { if _ , err := cl . DeleteIndexSet ( id ) ; err == nil { WaitAfterDeleteIndexSet ( server ) } } , nil }
GetIndexSet returns an IndexSet.
GetIndexSet returns an IndexSet .